mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Add configure probe for rl_variable_bind().
Some exceedingly ancient readline libraries lack this function, causing commit 3d858af07 to fail. Per buildfarm (via Michael Paquier). Discussion: https://postgr.es/m/E1msTLm-0007Cm-Ri@gemulon.postgresql.org
This commit is contained in:
parent
a22d6a2cb6
commit
a7da419810
14
configure
vendored
14
configure
vendored
@ -17164,19 +17164,7 @@ $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ac_func in rl_completion_matches rl_filename_completion_function rl_reset_screen_size
|
for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
|
||||||
do :
|
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
|
||||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
|
||||||
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
|
||||||
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
|
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for ac_func in append_history history_truncate_file
|
|
||||||
do :
|
do :
|
||||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||||
|
10
configure.ac
10
configure.ac
@ -2001,8 +2001,14 @@ LIBS="$LIBS_including_readline"
|
|||||||
|
|
||||||
if test "$with_readline" = yes; then
|
if test "$with_readline" = yes; then
|
||||||
PGAC_READLINE_VARIABLES
|
PGAC_READLINE_VARIABLES
|
||||||
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function rl_reset_screen_size])
|
AC_CHECK_FUNCS(m4_normalize([
|
||||||
AC_CHECK_FUNCS([append_history history_truncate_file])
|
append_history
|
||||||
|
history_truncate_file
|
||||||
|
rl_completion_matches
|
||||||
|
rl_filename_completion_function
|
||||||
|
rl_reset_screen_size
|
||||||
|
rl_variable_bind
|
||||||
|
]))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -356,8 +356,10 @@ initializeInput(int flags)
|
|||||||
/* set appropriate values for Readline's global variables */
|
/* set appropriate values for Readline's global variables */
|
||||||
initialize_readline();
|
initialize_readline();
|
||||||
|
|
||||||
|
#ifdef HAVE_RL_VARIABLE_BIND
|
||||||
/* set comment-begin to a useful value for SQL */
|
/* set comment-begin to a useful value for SQL */
|
||||||
(void) rl_variable_bind("comment-begin", "-- ");
|
(void) rl_variable_bind("comment-begin", "-- ");
|
||||||
|
#endif
|
||||||
|
|
||||||
/* this reads ~/.inputrc, so do it after rl_variable_bind */
|
/* this reads ~/.inputrc, so do it after rl_variable_bind */
|
||||||
rl_initialize();
|
rl_initialize();
|
||||||
|
@ -485,6 +485,9 @@
|
|||||||
/* Define to 1 if you have the `rl_reset_screen_size' function. */
|
/* Define to 1 if you have the `rl_reset_screen_size' function. */
|
||||||
#undef HAVE_RL_RESET_SCREEN_SIZE
|
#undef HAVE_RL_RESET_SCREEN_SIZE
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `rl_variable_bind' function. */
|
||||||
|
#undef HAVE_RL_VARIABLE_BIND
|
||||||
|
|
||||||
/* Define to 1 if you have the <security/pam_appl.h> header file. */
|
/* Define to 1 if you have the <security/pam_appl.h> header file. */
|
||||||
#undef HAVE_SECURITY_PAM_APPL_H
|
#undef HAVE_SECURITY_PAM_APPL_H
|
||||||
|
|
||||||
|
@ -354,6 +354,7 @@ sub GenerateFiles
|
|||||||
HAVE_RL_FILENAME_QUOTE_CHARACTERS => undef,
|
HAVE_RL_FILENAME_QUOTE_CHARACTERS => undef,
|
||||||
HAVE_RL_FILENAME_QUOTING_FUNCTION => undef,
|
HAVE_RL_FILENAME_QUOTING_FUNCTION => undef,
|
||||||
HAVE_RL_RESET_SCREEN_SIZE => undef,
|
HAVE_RL_RESET_SCREEN_SIZE => undef,
|
||||||
|
HAVE_RL_VARIABLE_BIND => undef,
|
||||||
HAVE_SECURITY_PAM_APPL_H => undef,
|
HAVE_SECURITY_PAM_APPL_H => undef,
|
||||||
HAVE_SETENV => undef,
|
HAVE_SETENV => undef,
|
||||||
HAVE_SETPROCTITLE => undef,
|
HAVE_SETPROCTITLE => undef,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user