diff --git a/configure.in b/configure.in index 91895d2a..aa826c6c 100644 --- a/configure.in +++ b/configure.in @@ -265,10 +265,10 @@ AC_SUBST(LIBDL) AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no) AC_SUBST(LIBREADLINE) -# libreadline will also need libtermcap on some OSes saved_LIBS="$LIBS" +# libreadline will also need libtermcap on some OSes for add in "" "-ltermcap"; do - if test "X$add" != "X"; then + if test "x$add" != x; then AC_MSG_CHECKING([whether -lreadline requires $add]) fi LIBS="$saved_LIBS $add" @@ -277,9 +277,17 @@ for add in "" "-ltermcap"; do LIBREADLINE="-lreadline $add" ac_cv_func_readline_lreadline=yes ], ac_cv_func_readline_lreadline=no) - test "$ac_cv_func_readline_lreadline" = yes && break + if test "x$ac_cv_func_readline_lreadline" = xyes; then + if test "x$add" != x; then + AC_MSG_RESULT(yes) + fi + break; + else + if test "x$add" != x; then + AC_MSG_RESULT(no) + fi + fi done - LIBS="$LIBS $LIBREADLINE" AC_CHECK_FUNCS(readline) LIBS="$saved_LIBS"