* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / debugger / mcs51 / configure
index 2e7b6a3b6ad994172efe8e63fc0ff86dc9352ef8..e1e24184c2134c64cf9c3d76dd5e78a21ea28258 100644 (file)
@@ -3375,7 +3375,8 @@ done
 
 
 
-    if test "${ac_cv_header_readline_readline_h+set}" = set; then
+
+  if test "${ac_cv_header_readline_readline_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for readline/readline.h" >&5
 echo $ECHO_N "checking for readline/readline.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_readline_readline_h+set}" = set; then
@@ -3529,13 +3530,34 @@ fi
 
   if test "$ac_cv_header_readline_readline_h" = yes; then
 
+    cat > conftest.$ac_ext <<EOF
+#include <stdio.h>
+#include <readline/readline.h>
+wi_LIB_READLINE_VERSION RL_VERSION_MAJOR RL_VERSION_MINOR
+EOF
+
+    wi_READLINE_VERSION=$($CPP $CPPFLAGS conftest.$ac_ext | sed -n -e "s/^wi_LIB_READLINE_VERSION  *\([0-9\][0-9\]*\)  *\([0-9\][0-9\]*\)$/\1.\2/p")
+    rm -rf conftest*
+
+    if test -n "$wi_READLINE_VERSION"; then
+      wi_MAJOR=$(expr $wi_READLINE_VERSION : '\([0-9][0-9]*\)\.')
+      wi_MINOR=$(expr $wi_READLINE_VERSION : '[0-9][0-9]*\.\([0-9][0-9]*$\)')
+      if test $wi_MINOR -lt 10; then
+        wi_MINOR=$(expr $wi_MINOR \* 10)
+      fi
+      wi_READLINE_VERSION=$(expr $wi_MAJOR \* 100 + $wi_MINOR)
+    else
+      wi_READLINE_VERSION=-1
+    fi
+
+
     ac_save_LIBS="$LIBS"
     # Note: $LIBCURSES is permitted to be empty.
 
     for LIBREADLINE in "-lreadline.dll" "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses"
     do
-      { echo "$as_me:$LINENO: checking for GNU Readline library" >&5
-echo $ECHO_N "checking for GNU Readline library... $ECHO_C" >&6; }
+      { echo "$as_me:$LINENO: checking for GNU Readline library $LIBREADLINE" >&5
+echo $ECHO_N "checking for GNU Readline library $LIBREADLINE... $ECHO_C" >&6; }
 
       LIBS="$ac_save_LIBS $LIBREADLINE"
 
@@ -3555,8 +3577,8 @@ main ()
 {
 
         /* function-body */
+        int dummy = rl_completion_append_character; /* rl_completion_append_character appeared in version 2.1 */
         readline(NULL);
-        rl_function_of_keyseq(NULL, NULL, NULL);
 
   ;
   return 0;
@@ -3598,7 +3620,8 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (exit $ac_status); }; }; then
 
         wi_cv_lib_readline=yes
-        wi_cv_lib_readline_result="$LIBREADLINE"
+        { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
 
 else
   echo "$as_me: failed program was:" >&5
@@ -3606,7 +3629,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
 
         wi_cv_lib_readline=no
-        wi_cv_lib_readline_result=no
+        { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
 
 fi
 
@@ -3614,12 +3638,10 @@ rm -f core conftest.err conftest.$ac_objext \
       conftest$ac_exeext conftest.$ac_ext
 
       if test "$wi_cv_lib_readline" = yes; then
-        { echo "$as_me:$LINENO: result: $wi_cv_lib_readline_result" >&5
-echo "${ECHO_T}$wi_cv_lib_readline_result" >&6; }
 
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBREADLINE 1
+#define HAVE_LIBREADLINE $wi_READLINE_VERSION
 _ACEOF
 
         break
@@ -6841,65 +6863,4 @@ if test "$no_create" != yes; then
 fi
 
 
-# Prepare result message
-# ======================
-
-# In the C-header we need \\ as dir-separator, but in the message only \
-dirch=${sdccconf_h_dir_separator}
-test ${dirch} = '\\' && dirch='\'
-
-{ echo "$as_me:$LINENO: result:
-sdcdb is now configured for
-
-  Build:                ${build_alias}
-  Host:                 ${host_alias}
-  Source directory:     ${srcdir}
-  C compiler:           ${CC}
-  CFLAGS:               ${CFLAGS}
-
-  Install paths:
-    binary files:       ${exec_prefix}
-    include files:      ${datadir}/${include_dir_suffix}
-    library files:      ${datadir}/${lib_dir_suffix}
-    documentation:      ${docdir}
-
-    prefix:             ${prefix}
-    datadir:            ${datadir}
-
-  Search paths (incomplete, see manual for all search paths):
-    binary files:       \$SDCC_HOME${binPath}
-    include files:      ${incPath1}
-                        path(argv[0])${incPath2}
-                        ${incPath3}
-    library files:      \$SDCC_HOME${libPath1}${dirch}<model>
-                        path(argv[0])${libPath2}${dirch}<model>
-                        ${libPath3}${dirch}<model>
-" >&5
-echo "${ECHO_T}
-sdcdb is now configured for
-
-  Build:                ${build_alias}
-  Host:                 ${host_alias}
-  Source directory:     ${srcdir}
-  C compiler:           ${CC}
-  CFLAGS:               ${CFLAGS}
-
-  Install paths:
-    binary files:       ${exec_prefix}
-    include files:      ${datadir}/${include_dir_suffix}
-    library files:      ${datadir}/${lib_dir_suffix}
-    documentation:      ${docdir}
-
-    prefix:             ${prefix}
-    datadir:            ${datadir}
-
-  Search paths (incomplete, see manual for all search paths):
-    binary files:       \$SDCC_HOME${binPath}
-    include files:      ${incPath1}
-                        path(argv[0])${incPath2}
-                        ${incPath3}
-    library files:      \$SDCC_HOME${libPath1}${dirch}<model>
-                        path(argv[0])${libPath2}${dirch}<model>
-                        ${libPath3}${dirch}<model>
-" >&6; }
 # End of configure/configure.in