@@ -117,15 +117,14 @@ AC_SUBST(FLEXFLAGS)
117117AC_DEFUN ( [ PGAC_CHECK_READLINE] ,
118118[ AC_REQUIRE ( [ AC_CANONICAL_HOST ] )
119119
120- AC_CACHE_VAL ( [ pgac_cv_check_readline] ,
120+ AC_CACHE_CHECK ( [ for library containing readline ] , [ pgac_cv_check_readline] ,
121121[ pgac_cv_check_readline=no
122122pgac_save_LIBS=$LIBS
123123if test x"$with_libedit_preferred" != x"yes"
124124then READLINE_ORDER="-lreadline -ledit"
125125else READLINE_ORDER="-ledit -lreadline"
126126fi
127127for pgac_rllib in $READLINE_ORDER ; do
128- AC_MSG_CHECKING ( [ for ${pgac_rllib}] )
129128 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
130129 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
131130 AC_TRY_LINK_FUNC ( [ readline] , [ [
@@ -144,14 +143,11 @@ for pgac_rllib in $READLINE_ORDER ; do
144143 ] ] )
145144 done
146145 if test "$pgac_cv_check_readline" != no ; then
147- AC_MSG_RESULT ( [ yes ($pgac_cv_check_readline)] )
148146 break
149- else
150- AC_MSG_RESULT ( no )
151147 fi
152148done
153149LIBS=$pgac_save_LIBS
154- ] ) [ ] dnl AC_CACHE_VAL
150+ ] ) [ ] dnl AC_CACHE_CHECK
155151
156152if test "$pgac_cv_check_readline" != no ; then
157153 LIBS="$pgac_cv_check_readline $LIBS"
167163# Readline versions < 2.1 don't have rl_completion_append_character
168164
169165AC_DEFUN ( [ PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER] ,
170- [ AC_MSG_CHECKING ( [ for rl_completion_append_character] )
171- AC_TRY_LINK ( [ #include <stdio.h>
166+ [ AC_CACHE_CHECK ( [ for rl_completion_append_character] , pgac_cv_var_rl_completion_append_character ,
167+ [ AC_TRY_LINK ( [ #include <stdio.h>
172168#ifdef HAVE_READLINE_READLINE_H
173169# include <readline/readline.h>
174170#elif defined(HAVE_READLINE_H)
175171# include <readline.h>
176172#endif
177173] ,
178174[ rl_completion_append_character = 'x';] ,
179- [ AC_MSG_RESULT ( yes )
175+ [ pgac_cv_var_rl_completion_append_character=yes] ,
176+ [ pgac_cv_var_rl_completion_append_character=no] ) ] )
177+ if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
180178AC_DEFINE ( HAVE_RL_COMPLETION_APPEND_CHARACTER , 1 ,
181- [ Define to 1 if you have the global variable 'rl_completion_append_character'.] ) ] ,
182- [ AC_MSG_RESULT ( no ) ] ) ] ) # PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
179+ [ Define to 1 if you have the global variable 'rl_completion_append_character'.] )
180+ fi ] ) # PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER
183181
184182
185183
0 commit comments