From a7dff3d9b068b7987ba97b00a871eac06dc1af33 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 11 Oct 2016 17:30:13 +1100 Subject: [PATCH] don't clobber readline (cherry picked from commit ccf0bea98ab2fc3c3bd67f8785ff40d4639c66d0) --- configure | 20 ++++++++++---------- configure.in | 16 ++++++++-------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index d6d496cd71..49be448a49 100755 --- a/configure +++ b/configure @@ -19082,11 +19082,11 @@ case "$readline" in no) ;; yes|auto) saved_LIBS="$LIBS" - for readline in -ledit -lreadline + for xreadline in -ledit -lreadline do - 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;} + 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;} for ac_func in readline do : ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline" @@ -19100,15 +19100,15 @@ done if test "$ac_cv_func_readline" = "yes" then - READLINE_LIB="$readline" + READLINE_LIB="$xreadline" break fi 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;} + { $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;} unset ac_cv_func_readline - LIBS="$readline $lib" + LIBS="$xreadline $lib" for ac_func in readline do : ac_fn_c_check_func "$LINENO" "readline" "ac_cv_func_readline" @@ -19122,7 +19122,7 @@ done if test "$ac_cv_func_readline" = "yes" then - READLINE_LIB="$readline $lib" + READLINE_LIB="$xreadline $lib" break fi done @@ -19131,7 +19131,7 @@ done break fi done - if test "X$readline" = Xyes -a "$ac_cv_func_readline" != yes + if test "X$xreadline" = Xyes -a "$ac_cv_func_readline" != yes then as_fn_error $? "The readline library was not found." "$LINENO" 5 fi diff --git a/configure.in b/configure.in index 699fc6f7e2..4b8a9fd7d8 100644 --- a/configure.in +++ b/configure.in @@ -3441,25 +3441,25 @@ case "$readline" in no) ;; yes|auto) saved_LIBS="$LIBS" - for readline in -ledit -lreadline + for xreadline in -ledit -lreadline do - LIBS="$readline" - AC_MSG_NOTICE(checking for readline with $readline) + LIBS="$xreadline" + AC_MSG_NOTICE(checking for readline with $xreadline) AC_CHECK_FUNCS(readline) if test "$ac_cv_func_readline" = "yes" then - READLINE_LIB="$readline" + READLINE_LIB="$xreadline" break fi for lib in -lterminfo -ltermcap -lncurses -lcurses do - AC_MSG_NOTICE(checking for readline with $readline $lib) + AC_MSG_NOTICE(checking for readline with $xreadline $lib) unset ac_cv_func_readline - LIBS="$readline $lib" + LIBS="$xreadline $lib" AC_CHECK_FUNCS(readline) if test "$ac_cv_func_readline" = "yes" then - READLINE_LIB="$readline $lib" + READLINE_LIB="$xreadline $lib" break fi done @@ -3468,7 +3468,7 @@ yes|auto) break fi done - if test "X$readline" = Xyes -a "$ac_cv_func_readline" != yes + if test "X$xreadline" = Xyes -a "$ac_cv_func_readline" != yes then AC_MSG_ERROR([The readline library was not found.]) fi