diff options
author | Guido van Rossum <guido@python.org> | 2001-07-10 16:45:32 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-07-10 16:45:32 (GMT) |
commit | 353ae5896499d0ec297cff00e3686f4cd88668c3 (patch) | |
tree | 2d4bc47e3fc79a3c702b7ef6ff16101620341b4a /configure | |
parent | d854831ddd2adbec80f38ffb26a0f355b9c8772e (diff) | |
download | cpython-353ae5896499d0ec297cff00e3686f4cd88668c3.zip cpython-353ae5896499d0ec297cff00e3686f4cd88668c3.tar.gz cpython-353ae5896499d0ec297cff00e3686f4cd88668c3.tar.bz2 |
SF Patch #432457 by Jason Tishler: support for readline 4.2.
This patch allows the readline module to build cleanly with GNU
readline 4.2 without breaking the build for earlier GNU readline
versions. The configure script checks for the presence of
rl_completion_matches in libreadline.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 53 |
1 files changed, 49 insertions, 4 deletions
@@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.222 +# From configure.in Revision: 1.224 # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 @@ -6814,6 +6814,51 @@ EOF fi +# check for readline 4.2 +echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 +echo "configure:6820: checking for rl_completion_matches in -lreadline" >&5 +ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lreadline -ltermcap $LIBS" +cat > conftest.$ac_ext <<EOF +#line 6828 "configure" +#include "confdefs.h" +/* 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 rl_completion_matches(); + +int main() { +rl_completion_matches() +; return 0; } +EOF +if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_RL_COMPLETION_MATCHES 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS! # Add sys/socket.h to confdefs.h cat >> confdefs.h <<\EOF @@ -6822,12 +6867,12 @@ cat >> confdefs.h <<\EOF #endif EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:6826: checking for socklen_t" >&5 +echo "configure:6871: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6831 "configure" +#line 6876 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -6876,7 +6921,7 @@ done SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 -echo "configure:6880: checking for build directories" >&5 +echo "configure:6925: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then mkdir $dir |