diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-09-30 21:09:59 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-09-30 21:09:59 (GMT) |
commit | 0daad598d0947395248f087c2aa347083f440e36 (patch) | |
tree | f102f904cd0d76c2ccf2304cc5b630640c2b3646 /configure | |
parent | 16dc7f44b1116aab58897bc7e94cb972488206fc (diff) | |
download | cpython-0daad598d0947395248f087c2aa347083f440e36.zip cpython-0daad598d0947395248f087c2aa347083f440e36.tar.gz cpython-0daad598d0947395248f087c2aa347083f440e36.tar.bz2 |
Patch #462122: add readline startup and pre_event hooks.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 63 |
1 files changed, 54 insertions, 9 deletions
@@ -7027,9 +7027,54 @@ EOF fi +# check for readline 4.0 +echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6 +echo "configure:7033: checking for rl_pre_input_hook in -lreadline" >&5 +ac_lib_var=`echo readline'_'rl_pre_input_hook | 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 7041 "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_pre_input_hook(); + +int main() { +rl_pre_input_hook() +; return 0; } +EOF +if { (eval echo configure:7052: \"$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_PRE_INPUT_HOOK 1 +EOF + +else + echo "$ac_t""no" 1>&6 +fi + + # check for readline 4.2 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6 -echo "configure:7033: checking for rl_completion_matches in -lreadline" >&5 +echo "configure:7078: 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 @@ -7037,7 +7082,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline -ltermcap $LIBS" cat > conftest.$ac_ext <<EOF -#line 7041 "configure" +#line 7086 "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 @@ -7048,7 +7093,7 @@ int main() { rl_completion_matches() ; return 0; } EOF -if { (eval echo configure:7052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7097: \"$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 @@ -7073,7 +7118,7 @@ fi echo $ac_n "checking for broken nice()""... $ac_c" 1>&6 -echo "configure:7077: checking for broken nice()" >&5 +echo "configure:7122: checking for broken nice()" >&5 if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7082,7 +7127,7 @@ if test "$cross_compiling" = yes; then ac_cv_broken_nice=no else cat > conftest.$ac_ext <<EOF -#line 7086 "configure" +#line 7131 "configure" #include "confdefs.h" int main() @@ -7094,7 +7139,7 @@ int main() } EOF -if { (eval echo configure:7098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_broken_nice=yes else @@ -7125,12 +7170,12 @@ cat >> confdefs.h <<\EOF #endif EOF echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:7129: checking for socklen_t" >&5 +echo "configure:7174: 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 7134 "configure" +#line 7179 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -7179,7 +7224,7 @@ done SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 -echo "configure:7183: checking for build directories" >&5 +echo "configure:7228: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then mkdir $dir |