]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
further readline changes [RT #43139]
authorMark Andrews <marka@isc.org>
Wed, 12 Oct 2016 00:56:59 +0000 (11:56 +1100)
committerMark Andrews <marka@isc.org>
Wed, 12 Oct 2016 00:56:59 +0000 (11:56 +1100)
configure
configure.in

index 49be448a498f4faa5f96f50701945af141a522a9..6629a6bb15a3ab2e249d5e1e9c701743a847c012 100755 (executable)
--- a/configure
+++ b/configure
 
 # Check whether --with-readline was given.
 if test "${with_readline+set}" = set; then :
-  withval=$with_readline; readline="$withval"
+  withval=$with_readline; use_readline="$withval"
 else
-  readline="auto"
+  use_readline="auto"
 fi
 
-case "$readline" in
+case "$use_readline" in
 no)    ;;
-yes|auto)
+*)
        saved_LIBS="$LIBS"
-       for xreadline in -ledit -lreadline
+       case "$use_readline" in
+       yes|auto) try_readline="-ledit"; or_readline="-lreadline" ;;
+       *) try_readline="$use_readline"
+       esac
+       for readline in "$try_readline" $or_readline
        do
-               LIBS="$xreadline"
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $xreadline" >&5
-$as_echo "$as_me: checking for readline with $xreadline" >&6;}
+               LIBS="$readline"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline" >&5
+$as_echo "$as_me: checking for readline with $readline" >&6;}
                for ac_func in readline
 do :
   ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline"
@@ -19100,15 +19104,15 @@ done
 
                if test "$ac_cv_func_readline" = "yes"
                then
-                       READLINE_LIB="$xreadline"
+                       READLINE_LIB="$readline"
                        break
                fi
                for lib in -lterminfo -ltermcap -lncurses -lcurses
                do
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $xreadline $lib" >&5
-$as_echo "$as_me: checking for readline with $xreadline $lib" >&6;}
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline $lib" >&5
+$as_echo "$as_me: checking for readline with $readline $lib" >&6;}
                        unset ac_cv_func_readline
-                       LIBS="$xreadline $lib"
+                       LIBS="$readline $lib"
                        for ac_func in readline
 do :
   ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline"
@@ -19122,7 +19126,7 @@ done
 
                        if test "$ac_cv_func_readline" = "yes"
                        then
-                               READLINE_LIB="$xreadline $lib"
+                               READLINE_LIB="$readline $lib"
                                break
                        fi
                done
@@ -19131,57 +19135,8 @@ done
                        break
                fi
        done
-       if test "X$xreadline" = Xyes -a "$ac_cv_func_readline" != yes
-       then
-               as_fn_error $? "The readline library was not found." "$LINENO" 5
-       fi
-       LIBS="$saved_LIBS"
-       ;;
-*)
-       saved_LIBS="$LIBS"
-       LIBS="$readline"
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline" >&5
-$as_echo "$as_me: checking for readline with $readline" >&6;}
-       for ac_func in readline
-do :
-  ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline"
-if test "x$ac_cv_func_readline" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_READLINE 1
-_ACEOF
-
-fi
-done
-
-       if test "$ac_cv_func_readline" = "yes"
-       then
-               READLINE_LIB="$readline"
-       else
-               for lib in -lterminfo -ltermcap -lncurses -lcurses
-               do
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline with $readline $lib" >&5
-$as_echo "$as_me: checking for readline with $readline $lib" >&6;}
-                       unset ac_cv_func_readline
-                       LIBS="$readline $lib"
-                       for ac_func in readline
-do :
-  ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline"
-if test "x$ac_cv_func_readline" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_READLINE 1
-_ACEOF
-
-fi
-done
-
-                       if test "$ac_cv_func_readline" = "yes"
-                       then
-                               READLINE_LIB="$readline $lib"
-                               break
-                       fi
-               done
-       fi
-       if test "$ac_cv_func_readline" != yes
+       if test "$use_readline" != "auto" &&
+          test "X$READLINE_LIB" = "X"
        then
                as_fn_error $? "The readline library was not found." "$LINENO" 5
        fi
index 4b8a9fd7d8f9e724980bbdbb805eeaf38780abce..d43b56d94610a5017c5626372fc7030aa790f749 100644 (file)
@@ -3436,30 +3436,34 @@ AC_SUBST(ISC_PLATFORM_NEEDSTRCASESTR)
 AC_SUBST(READLINE_LIB)
 AC_ARG_WITH(readline,
        [  --with-readline[=LIBSPEC]    specify readline library [default auto]],
-       readline="$withval", readline="auto")
-case "$readline" in
+       use_readline="$withval", use_readline="auto")
+case "$use_readline" in
 no)    ;;
-yes|auto)
+*)
        saved_LIBS="$LIBS"
-       for xreadline in -ledit -lreadline
+       case "$use_readline" in
+       yes|auto) try_readline="-ledit"; or_readline="-lreadline" ;;
+       *) try_readline="$use_readline"
+       esac
+       for readline in "$try_readline" $or_readline
        do
-               LIBS="$xreadline"
-               AC_MSG_NOTICE(checking for readline with $xreadline)
+               LIBS="$readline"
+               AC_MSG_NOTICE(checking for readline with $readline)
                AC_CHECK_FUNCS(readline)
                if test "$ac_cv_func_readline" = "yes"
                then
-                       READLINE_LIB="$xreadline"
+                       READLINE_LIB="$readline"
                        break
                fi
                for lib in -lterminfo -ltermcap -lncurses -lcurses
                do
-                       AC_MSG_NOTICE(checking for readline with $xreadline $lib)
+                       AC_MSG_NOTICE(checking for readline with $readline $lib)
                        unset ac_cv_func_readline
-                       LIBS="$xreadline $lib"
+                       LIBS="$readline $lib"
                        AC_CHECK_FUNCS(readline)
                        if test "$ac_cv_func_readline" = "yes"
                        then
-                               READLINE_LIB="$xreadline $lib"
+                               READLINE_LIB="$readline $lib"
                                break
                        fi
                done
@@ -3468,35 +3472,8 @@ yes|auto)
                        break
                fi
        done
-       if test "X$xreadline" = Xyes -a "$ac_cv_func_readline" != yes
-       then
-               AC_MSG_ERROR([The readline library was not found.])
-       fi
-       LIBS="$saved_LIBS"
-       ;;
-*)
-       saved_LIBS="$LIBS"
-       LIBS="$readline"
-       AC_MSG_NOTICE(checking for readline with $readline)
-       AC_CHECK_FUNCS(readline)
-       if test "$ac_cv_func_readline" = "yes"
-       then
-               READLINE_LIB="$readline"
-       else
-               for lib in -lterminfo -ltermcap -lncurses -lcurses
-               do
-                       AC_MSG_NOTICE(checking for readline with $readline $lib)
-                       unset ac_cv_func_readline
-                       LIBS="$readline $lib"
-                       AC_CHECK_FUNCS(readline)
-                       if test "$ac_cv_func_readline" = "yes"
-                       then
-                               READLINE_LIB="$readline $lib"
-                               break
-                       fi
-               done
-       fi
-       if test "$ac_cv_func_readline" != yes
+       if test "$use_readline" != "auto" &&
+          test "X$READLINE_LIB" = "X"
        then
                AC_MSG_ERROR([The readline library was not found.])
        fi