diff --git a/configure b/configure index 49a3eafe7c..855bbcff0e 100755 --- a/configure +++ b/configure @@ -6616,12 +6616,12 @@ cat > conftest.$ac_ext < -#ifdef HAVE_READLINE_H -# include -#endif #ifdef HAVE_READLINE_READLINE_H # include +#elif defined(HAVE_READLINE_H) +# include #endif + int main() { rl_completion_append_character = 'x'; ; return 0; } @@ -6641,53 +6641,74 @@ else fi rm -f conftest* - -# Check whether readline's filename_completion_function is declared. -# Some prehistoric versions of readline, in particular those shipped -# with earlier Cygwins don't have this declared, although it's in the -# library. -echo $ac_n "checking whether filename_completion_function is declared""... $ac_c" 1>&6 -echo "configure:6651: checking whether filename_completion_function is declared" >&5 -if test "$ac_cv_header_readline_h" = yes; then - _readline_header='readline.h' -elif test "$ac_cv_header_readline_readline_h" = yes; then - _readline_header='readline/readline.h' +for ac_func in rl_completion_matches +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:6648: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - _readline_header='xxx' -fi -cat > conftest.$ac_ext < conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "filename_completion_function" >/dev/null 2>&1; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_FILENAME_COMPLETION_FUNCTION_DECL 1 -EOF +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func(); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); -echo "$ac_t""yes" 1>&6 -else +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - echo "$ac_t""no" 1>&6 + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done echo $ac_n "checking for finite""... $ac_c" 1>&6 -echo "configure:6682: checking for finite" >&5 +echo "configure:6703: checking for finite" >&5 cat > conftest.$ac_ext < int main() { int dummy=finite(1.0); ; return 0; } EOF -if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_FINITE 1 @@ -6702,16 +6723,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:6706: checking for sigsetjmp" >&5 +echo "configure:6727: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf x; sigsetjmp(x, 1); ; return 0; } EOF -if { (eval echo configure:6715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_SIGSETJMP 1 @@ -6731,12 +6752,12 @@ if test x"${enable_syslog+set}" = xset; then case $enable_syslog in yes) echo $ac_n "checking for syslog""... $ac_c" 1>&6 -echo "configure:6735: checking for syslog" >&5 +echo "configure:6756: checking for syslog" >&5 if eval "test \"`echo '$''{'ac_cv_func_syslog'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_syslog=yes" else @@ -6798,19 +6819,19 @@ fi echo $ac_n "checking for optreset""... $ac_c" 1>&6 -echo "configure:6802: checking for optreset" >&5 +echo "configure:6823: checking for optreset" >&5 if eval "test \"`echo '$''{'pgac_cv_var_int_optreset'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { extern int optreset; optreset = 1; ; return 0; } EOF -if { (eval echo configure:6814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* pgac_cv_var_int_optreset=yes else @@ -6836,16 +6857,16 @@ fi # This check should come after all modifications of compiler or linker # variables, and before any other run tests. echo $ac_n "checking test program""... $ac_c" 1>&6 -echo "configure:6840: checking test program" >&5 +echo "configure:6861: checking test program" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""cross-compiling" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""ok" 1>&6 else @@ -6865,7 +6886,7 @@ fi echo $ac_n "checking whether long int is 64 bits""... $ac_c" 1>&6 -echo "configure:6869: checking whether long int is 64 bits" >&5 +echo "configure:6890: checking whether long int is 64 bits" >&5 if eval "test \"`echo '$''{'pgac_cv_type_long_int_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6874,7 +6895,7 @@ else echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_type_long_int_64=yes else @@ -6930,7 +6951,7 @@ fi if test x"$HAVE_LONG_INT_64" = x"no" ; then echo $ac_n "checking whether long long int is 64 bits""... $ac_c" 1>&6 -echo "configure:6934: checking whether long long int is 64 bits" >&5 +echo "configure:6955: checking whether long long int is 64 bits" >&5 if eval "test \"`echo '$''{'pgac_cv_type_long_long_int_64'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6939,7 +6960,7 @@ else echo "configure: warning: 64 bit arithmetic disabled when cross-compiling" 1>&2 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_type_long_long_int_64=yes else @@ -6998,7 +7019,7 @@ fi if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_LL_CONSTANTS 1 @@ -7026,7 +7047,7 @@ fi if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then if [ x$SNPRINTF = x ] ; then echo $ac_n "checking whether snprintf handles 'long long int' as %lld""... $ac_c" 1>&6 -echo "configure:7030: checking whether snprintf handles 'long long int' as %lld" >&5 +echo "configure:7051: checking whether snprintf handles 'long long int' as %lld" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 # Force usage of our own snprintf, since we cannot test foreign snprintf @@ -7035,7 +7056,7 @@ echo "configure:7030: checking whether snprintf handles 'long long int' as %lld" else cat > conftest.$ac_ext < typedef long long int int64; @@ -7062,7 +7083,7 @@ main() { exit(! does_int64_snprintf_work()); } EOF -if { (eval echo configure:7066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 INT64_FORMAT='"%lld"' @@ -7073,7 +7094,7 @@ else rm -fr conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking whether snprintf handles 'long long int' as %qd""... $ac_c" 1>&6 -echo "configure:7077: checking whether snprintf handles 'long long int' as %qd" >&5 +echo "configure:7098: checking whether snprintf handles 'long long int' as %qd" >&5 if test "$cross_compiling" = yes; then echo "$ac_t""assuming not on target machine" 1>&6 # Force usage of our own snprintf, since we cannot test foreign snprintf @@ -7082,7 +7103,7 @@ echo "configure:7077: checking whether snprintf handles 'long long int' as %qd" else cat > conftest.$ac_ext < typedef long long int int64; @@ -7109,7 +7130,7 @@ main() { exit(! does_int64_snprintf_work()); } EOF -if { (eval echo configure:7113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 INT64_FORMAT='"%qd"' @@ -7149,12 +7170,12 @@ EOF for ac_func in strtoll strtoq do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7153: checking for $ac_func" >&5 +echo "configure:7174: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7204,12 +7225,12 @@ done for ac_func in strtoull strtouq do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7208: checking for $ac_func" >&5 +echo "configure:7229: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7258,12 +7279,12 @@ done echo $ac_n "checking for atexit""... $ac_c" 1>&6 -echo "configure:7262: checking for atexit" >&5 +echo "configure:7283: checking for atexit" >&5 if eval "test \"`echo '$''{'ac_cv_func_atexit'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_atexit=yes" else @@ -7309,12 +7330,12 @@ else for ac_func in on_exit do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7313: checking for $ac_func" >&5 +echo "configure:7334: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7370,7 +7391,7 @@ fi echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6 -echo "configure:7374: checking size of unsigned long" >&5 +echo "configure:7395: checking size of unsigned long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7378,7 +7399,7 @@ else ac_cv_sizeof_unsigned_long=4 else cat > conftest.$ac_ext < main() @@ -7389,7 +7410,7 @@ main() exit(0); } EOF -if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_unsigned_long=`cat conftestval` else @@ -7415,7 +7436,7 @@ EOF echo $ac_n "checking alignment of short""... $ac_c" 1>&6 -echo "configure:7419: checking alignment of short" >&5 +echo "configure:7440: checking alignment of short" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7423,7 +7444,7 @@ else pgac_cv_alignof_short='sizeof(short)' else cat > conftest.$ac_ext < struct { char filler; short field; } mystruct; @@ -7435,7 +7456,7 @@ main() exit(0); } EOF -if { (eval echo configure:7439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_short=`cat conftestval` else @@ -7455,7 +7476,7 @@ EOF echo $ac_n "checking alignment of int""... $ac_c" 1>&6 -echo "configure:7459: checking alignment of int" >&5 +echo "configure:7480: checking alignment of int" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7463,7 +7484,7 @@ else pgac_cv_alignof_int='sizeof(int)' else cat > conftest.$ac_ext < struct { char filler; int field; } mystruct; @@ -7475,7 +7496,7 @@ main() exit(0); } EOF -if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_int=`cat conftestval` else @@ -7495,7 +7516,7 @@ EOF echo $ac_n "checking alignment of long""... $ac_c" 1>&6 -echo "configure:7499: checking alignment of long" >&5 +echo "configure:7520: checking alignment of long" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7503,7 +7524,7 @@ else pgac_cv_alignof_long='sizeof(long)' else cat > conftest.$ac_ext < struct { char filler; long field; } mystruct; @@ -7515,7 +7536,7 @@ main() exit(0); } EOF -if { (eval echo configure:7519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_long=`cat conftestval` else @@ -7536,7 +7557,7 @@ EOF if [ x"$HAVE_LONG_LONG_INT_64" = xyes ] ; then echo $ac_n "checking alignment of long long int""... $ac_c" 1>&6 -echo "configure:7540: checking alignment of long long int" >&5 +echo "configure:7561: checking alignment of long long int" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_long_long_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7544,7 +7565,7 @@ else pgac_cv_alignof_long_long_int='sizeof(long long int)' else cat > conftest.$ac_ext < struct { char filler; long long int field; } mystruct; @@ -7556,7 +7577,7 @@ main() exit(0); } EOF -if { (eval echo configure:7560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_long_long_int=`cat conftestval` else @@ -7577,7 +7598,7 @@ EOF fi echo $ac_n "checking alignment of double""... $ac_c" 1>&6 -echo "configure:7581: checking alignment of double" >&5 +echo "configure:7602: checking alignment of double" >&5 if eval "test \"`echo '$''{'pgac_cv_alignof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7585,7 +7606,7 @@ else pgac_cv_alignof_double='sizeof(double)' else cat > conftest.$ac_ext < struct { char filler; double field; } mystruct; @@ -7597,7 +7618,7 @@ main() exit(0); } EOF -if { (eval echo configure:7601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then pgac_cv_alignof_double=`cat conftestval` else @@ -7635,12 +7656,12 @@ EOF echo $ac_n "checking for POSIX signal interface""... $ac_c" 1>&6 -echo "configure:7639: checking for POSIX signal interface" >&5 +echo "configure:7660: checking for POSIX signal interface" >&5 if eval "test \"`echo '$''{'pgac_cv_func_posix_signals'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -7651,7 +7672,7 @@ act.sa_flags = SA_RESTART; sigaction(0, &act, &oact); ; return 0; } EOF -if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* pgac_cv_func_posix_signals=yes else @@ -7681,7 +7702,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7685: checking for $ac_word" >&5 +echo "configure:7706: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TCLSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7717,7 +7738,7 @@ test -n "$TCLSH" && break done echo $ac_n "checking for tclConfig.sh""... $ac_c" 1>&6 -echo "configure:7721: checking for tclConfig.sh" >&5 +echo "configure:7742: checking for tclConfig.sh" >&5 # Let user override test if test -z "$TCL_CONFIG_SH"; then pgac_test_dirs="$with_tclconfig" @@ -7750,7 +7771,7 @@ fi # Check for Tk configuration script tkConfig.sh if test "$with_tk" = yes; then echo $ac_n "checking for tkConfig.sh""... $ac_c" 1>&6 -echo "configure:7754: checking for tkConfig.sh" >&5 +echo "configure:7775: checking for tkConfig.sh" >&5 # Let user override test if test -z "$TK_CONFIG_SH"; then pgac_test_dirs="$with_tkconfig $with_tclconfig" @@ -7789,7 +7810,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7793: checking for $ac_word" >&5 +echo "configure:7814: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_NSGMLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7825,7 +7846,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7829: checking for $ac_word" >&5 +echo "configure:7850: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_JADE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7856,7 +7877,7 @@ done echo $ac_n "checking for DocBook V3.1""... $ac_c" 1>&6 -echo "configure:7860: checking for DocBook V3.1" >&5 +echo "configure:7881: checking for DocBook V3.1" >&5 if eval "test \"`echo '$''{'pgac_cv_check_docbook'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7889,7 +7910,7 @@ have_docbook=$pgac_cv_check_docbook echo $ac_n "checking for DocBook stylesheets""... $ac_c" 1>&6 -echo "configure:7893: checking for DocBook stylesheets" >&5 +echo "configure:7914: checking for DocBook stylesheets" >&5 if eval "test \"`echo '$''{'pgac_cv_path_stylesheets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7928,7 +7949,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7932: checking for $ac_word" >&5 +echo "configure:7953: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SGMLSPL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index 1919f79336..57833a5da8 100644 --- a/configure.in +++ b/configure.in @@ -879,35 +879,18 @@ AC_CHECK_FUNC(rint, # Readline versions < 2.1 don't have rl_completion_append_character AC_MSG_CHECKING([for rl_completion_append_character]) AC_TRY_LINK([#include -#ifdef HAVE_READLINE_H -# include -#endif #ifdef HAVE_READLINE_READLINE_H # include -#endif], +#elif defined(HAVE_READLINE_H) +# include +#endif +], [rl_completion_append_character = 'x';], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER)], [AC_MSG_RESULT(no)]) - -# Check whether readline's filename_completion_function is declared. -# Some prehistoric versions of readline, in particular those shipped -# with earlier Cygwins don't have this declared, although it's in the -# library. -AC_MSG_CHECKING([whether filename_completion_function is declared]) -if test "$ac_cv_header_readline_h" = yes; then - _readline_header='readline.h' -elif test "$ac_cv_header_readline_readline_h" = yes; then - _readline_header='readline/readline.h' -else - _readline_header='xxx' -fi -AC_EGREP_HEADER([filename_completion_function], [$_readline_header], -[AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL) -AC_MSG_RESULT(yes)], -[AC_MSG_RESULT(no)]) - +AC_CHECK_FUNCS([rl_completion_matches]) dnl Cannot use AC_CHECK_FUNC because finite may be a macro diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index f372e0ea61..d80465af59 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.29 2001/03/30 04:50:47 tgl Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.30 2001/04/14 22:55:02 petere Exp $ */ /*---------------------------------------------------------------------- @@ -60,9 +60,10 @@ #include "common.h" #include "settings.h" -#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL -char *filename_completion_function(char *, int); +extern char *filename_completion_function(); +#ifdef HAVE_RL_COMPLETION_MATCHES +#define completion_matches(x, y) rl_completion_matches((x), ((rl_compentry_func_t *)(y))) #endif #define BUF_SIZE 2048 @@ -100,7 +101,7 @@ void initialize_readline(void) { rl_readline_name = pset.progname; - rl_attempted_completion_function = psql_completion; + rl_attempted_completion_function = (void *)psql_completion; rl_basic_word_break_characters = "\t\n@$><=;|&{( "; diff --git a/src/include/config.h.in b/src/include/config.h.in index a4c1752ea1..0d989dbbb3 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -8,7 +8,7 @@ * or in config.h afterwards. Of course, if you edit config.h, then your * changes will be overwritten the next time you run configure. * - * $Id: config.h.in,v 1.161 2001/03/23 18:42:12 tgl Exp $ + * $Id: config.h.in,v 1.162 2001/04/14 22:55:02 petere Exp $ */ #ifndef CONFIG_H @@ -573,8 +573,8 @@ extern int fdatasync(int fildes); /* Set to 1 if your libreadline defines rl_completion_append_character */ #undef HAVE_RL_COMPLETION_APPEND_CHARACTER -/* Set to 1 if filename_completion_function is declared in the readline header */ -#undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL +/* Set to 1 if you have rl_completion_matches */ +#undef HAVE_RL_COMPLETION_MATCHES /* Set to 1 if you have getopt_long() (GNU long options) */ #undef HAVE_GETOPT_LONG