@@ -8041,6 +8041,10 @@ done
80418041fi
80428042
80438043if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
8044+ # Some installations of libedit usurp /usr/include/readline/, which seems
8045+ # bad practice, since in combined installations readline will have its headers
8046+ # there. We might have to resort to AC_EGREP checks to make sure we found
8047+ # the proper header...
80448048
80458049for ac_header in editline/readline.h
80468050do
@@ -8262,6 +8266,117 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
82628266#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
82638267_ACEOF
82648268
8269+ else
8270+
8271+ for ac_header in readline/readline.h
8272+ do
8273+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8274+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
8275+ echo "$as_me:$LINENO: checking for $ac_header" >&5
8276+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8277+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
8278+ echo $ECHO_N "(cached) $ECHO_C" >&6
8279+ fi
8280+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8281+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8282+ else
8283+ # Is the header compilable?
8284+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8285+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8286+ cat >conftest.$ac_ext <<_ACEOF
8287+ #line $LINENO "configure"
8288+ #include "confdefs.h"
8289+ $ac_includes_default
8290+ #include <$ac_header>
8291+ _ACEOF
8292+ rm -f conftest.$ac_objext
8293+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8294+ (eval $ac_compile) 2>&5
8295+ ac_status=$?
8296+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297+ (exit $ac_status); } &&
8298+ { ac_try='test -s conftest.$ac_objext'
8299+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300+ (eval $ac_try) 2>&5
8301+ ac_status=$?
8302+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303+ (exit $ac_status); }; }; then
8304+ ac_header_compiler=yes
8305+ else
8306+ echo "$as_me: failed program was:" >&5
8307+ cat conftest.$ac_ext >&5
8308+ ac_header_compiler=no
8309+ fi
8310+ rm -f conftest.$ac_objext conftest.$ac_ext
8311+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8312+ echo "${ECHO_T}$ac_header_compiler" >&6
8313+
8314+ # Is the header present?
8315+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8316+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8317+ cat >conftest.$ac_ext <<_ACEOF
8318+ #line $LINENO "configure"
8319+ #include "confdefs.h"
8320+ #include <$ac_header>
8321+ _ACEOF
8322+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8323+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8324+ ac_status=$?
8325+ egrep -v '^ *\+' conftest.er1 >conftest.err
8326+ rm -f conftest.er1
8327+ cat conftest.err >&5
8328+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8329+ (exit $ac_status); } >/dev/null; then
8330+ if test -s conftest.err; then
8331+ ac_cpp_err=$ac_c_preproc_warn_flag
8332+ else
8333+ ac_cpp_err=
8334+ fi
8335+ else
8336+ ac_cpp_err=yes
8337+ fi
8338+ if test -z "$ac_cpp_err"; then
8339+ ac_header_preproc=yes
8340+ else
8341+ echo "$as_me: failed program was:" >&5
8342+ cat conftest.$ac_ext >&5
8343+ ac_header_preproc=no
8344+ fi
8345+ rm -f conftest.err conftest.$ac_ext
8346+ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8347+ echo "${ECHO_T}$ac_header_preproc" >&6
8348+
8349+ # So? What about this header?
8350+ case $ac_header_compiler:$ac_header_preproc in
8351+ yes:no )
8352+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8353+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8354+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8355+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8356+ no:yes )
8357+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8358+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8359+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8360+ echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8361+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8362+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8363+ esac
8364+ echo "$as_me:$LINENO: checking for $ac_header" >&5
8365+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8366+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
8367+ echo $ECHO_N "(cached) $ECHO_C" >&6
8368+ else
8369+ eval "$as_ac_Header=$ac_header_preproc"
8370+ fi
8371+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8372+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8373+
8374+ fi
8375+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
8376+ cat >>confdefs.h <<_ACEOF
8377+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8378+ _ACEOF
8379+
82658380else
82668381 { { echo "$as_me:$LINENO: error: readline header not found
82678382If you have libedit already installed, see config.log for details on the
@@ -8280,6 +8395,10 @@ fi
82808395
82818396done
82828397
8398+ fi
8399+
8400+ done
8401+
82838402
82848403for ac_header in editline/history.h
82858404do
@@ -8501,6 +8620,117 @@ if test `eval echo '${'$as_ac_Header'}'` = yes; then
85018620#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
85028621_ACEOF
85038622
8623+ else
8624+
8625+ for ac_header in readline/history.h
8626+ do
8627+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8628+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
8629+ echo "$as_me:$LINENO: checking for $ac_header" >&5
8630+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8631+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
8632+ echo $ECHO_N "(cached) $ECHO_C" >&6
8633+ fi
8634+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8635+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8636+ else
8637+ # Is the header compilable?
8638+ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8639+ echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
8640+ cat >conftest.$ac_ext <<_ACEOF
8641+ #line $LINENO "configure"
8642+ #include "confdefs.h"
8643+ $ac_includes_default
8644+ #include <$ac_header>
8645+ _ACEOF
8646+ rm -f conftest.$ac_objext
8647+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8648+ (eval $ac_compile) 2>&5
8649+ ac_status=$?
8650+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8651+ (exit $ac_status); } &&
8652+ { ac_try='test -s conftest.$ac_objext'
8653+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8654+ (eval $ac_try) 2>&5
8655+ ac_status=$?
8656+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8657+ (exit $ac_status); }; }; then
8658+ ac_header_compiler=yes
8659+ else
8660+ echo "$as_me: failed program was:" >&5
8661+ cat conftest.$ac_ext >&5
8662+ ac_header_compiler=no
8663+ fi
8664+ rm -f conftest.$ac_objext conftest.$ac_ext
8665+ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8666+ echo "${ECHO_T}$ac_header_compiler" >&6
8667+
8668+ # Is the header present?
8669+ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8670+ echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
8671+ cat >conftest.$ac_ext <<_ACEOF
8672+ #line $LINENO "configure"
8673+ #include "confdefs.h"
8674+ #include <$ac_header>
8675+ _ACEOF
8676+ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
8677+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8678+ ac_status=$?
8679+ egrep -v '^ *\+' conftest.er1 >conftest.err
8680+ rm -f conftest.er1
8681+ cat conftest.err >&5
8682+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
8683+ (exit $ac_status); } >/dev/null; then
8684+ if test -s conftest.err; then
8685+ ac_cpp_err=$ac_c_preproc_warn_flag
8686+ else
8687+ ac_cpp_err=
8688+ fi
8689+ else
8690+ ac_cpp_err=yes
8691+ fi
8692+ if test -z "$ac_cpp_err"; then
8693+ ac_header_preproc=yes
8694+ else
8695+ echo "$as_me: failed program was:" >&5
8696+ cat conftest.$ac_ext >&5
8697+ ac_header_preproc=no
8698+ fi
8699+ rm -f conftest.err conftest.$ac_ext
8700+ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8701+ echo "${ECHO_T}$ac_header_preproc" >&6
8702+
8703+ # So? What about this header?
8704+ case $ac_header_compiler:$ac_header_preproc in
8705+ yes:no )
8706+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8707+ echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8708+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8709+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8710+ no:yes )
8711+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8712+ echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8713+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8714+ echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8715+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8716+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
8717+ esac
8718+ echo "$as_me:$LINENO: checking for $ac_header" >&5
8719+ echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8720+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
8721+ echo $ECHO_N "(cached) $ECHO_C" >&6
8722+ else
8723+ eval "$as_ac_Header=$ac_header_preproc"
8724+ fi
8725+ echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
8726+ echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8727+
8728+ fi
8729+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
8730+ cat >>confdefs.h <<_ACEOF
8731+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8732+ _ACEOF
8733+
85048734else
85058735 { { echo "$as_me:$LINENO: error: history header not found
85068736If you have libedit already installed, see config.log for details on the
@@ -8521,6 +8751,10 @@ done
85218751
85228752fi
85238753
8754+ done
8755+
8756+ fi
8757+
85248758if test "$with_zlib" = yes; then
85258759 if test "${ac_cv_header_zlib_h+set}" = set; then
85268760 echo "$as_me:$LINENO: checking for zlib.h" >&5