AC_DEFUN([PGAC_CHECK_READLINE],
[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_CACHE_VAL([pgac_cv_check_readline],
+AC_CACHE_CHECK([for library containing readline], [pgac_cv_check_readline],
[pgac_cv_check_readline=no
pgac_save_LIBS=$LIBS
if test x"$with_libedit_preferred" != x"yes"
else READLINE_ORDER="-ledit -lreadline"
fi
for pgac_rllib in $READLINE_ORDER ; do
- AC_MSG_CHECKING([for ${pgac_rllib}])
for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
AC_TRY_LINK_FUNC([readline], [[
]])
done
if test "$pgac_cv_check_readline" != no ; then
- AC_MSG_RESULT([yes ($pgac_cv_check_readline)])
break
- else
- AC_MSG_RESULT(no)
fi
done
LIBS=$pgac_save_LIBS
-])[]dnl AC_CACHE_VAL
+])[]dnl AC_CACHE_CHECK
if test "$pgac_cv_check_readline" != no ; then
LIBS="$pgac_cv_check_readline $LIBS"
# Readline versions < 2.1 don't have rl_completion_append_character
AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER],
-[AC_MSG_CHECKING([for rl_completion_append_character])
-AC_TRY_LINK([#include <stdio.h>
+[AC_CACHE_CHECK([for rl_completion_append_character], pgac_cv_var_rl_completion_append_character,
+[AC_TRY_LINK([#include <stdio.h>
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
#elif defined(HAVE_READLINE_H)
#endif
],
[rl_completion_append_character = 'x';],
-[AC_MSG_RESULT(yes)
+[pgac_cv_var_rl_completion_append_character=yes],
+[pgac_cv_var_rl_completion_append_character=no])])
+if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
- [Define to 1 if you have the global variable 'rl_completion_append_character'.])],
-[AC_MSG_RESULT(no)])])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
+ [Define to 1 if you have the global variable 'rl_completion_append_character'.])
+fi])# PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER