Commit 09f914d2 authored by Mark Andrews's avatar Mark Andrews

further readline changes [RT #43139]

parent 0e2fe405
......@@ -19073,20 +19073,24 @@ fi
# 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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment