11#! /bin/sh
2- # From configure.in Revision: 65857 .
2+ # From configure.in Revision: 66187 .
33# Guess values for system-dependent variables and create Makefiles.
44# Generated by GNU Autoconf 2.61 for python 3.0.
55#
@@ -22631,14 +22631,20 @@ fi
2263122631# save the value of LIBS so we don't actually link Python with readline
2263222632LIBS_no_readline=$LIBS
2263322633
22634- { echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22635- echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
22636- if test "${ac_cv_lib_readline_readline+set}" = set; then
22637- echo $ECHO_N "(cached) $ECHO_C" >&6
22638- else
22639- ac_check_lib_save_LIBS=$LIBS
22640- LIBS="-lreadline $LIBS"
22641- cat >conftest.$ac_ext <<_ACEOF
22634+ # On some systems we need to link readline to a termcap compatible
22635+ # library. NOTE: Keep the precedence of listed libraries synchronised
22636+ # with setup.py.
22637+ py_cv_lib_readline=no
22638+ { echo "$as_me:$LINENO: checking how to link readline libs" >&5
22639+ echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
22640+ for py_libtermcap in "" ncursesw ncurses curses termcap; do
22641+ if test -z "$py_libtermcap"; then
22642+ READLINE_LIBS="-lreadline"
22643+ else
22644+ READLINE_LIBS="-lreadline -l$py_libtermcap"
22645+ fi
22646+ LIBS="$READLINE_LIBS $LIBS_no_readline"
22647+ cat >conftest.$ac_ext <<_ACEOF
2264222648/* confdefs.h. */
2264322649_ACEOF
2264422650cat confdefs.h >>conftest.$ac_ext
@@ -22678,102 +22684,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2267822684 test ! -s conftest.err
2267922685 } && test -s conftest$ac_exeext &&
2268022686 $as_test_x conftest$ac_exeext; then
22681- ac_cv_lib_readline_readline =yes
22687+ py_cv_lib_readline =yes
2268222688else
2268322689 echo "$as_me: failed program was:" >&5
2268422690sed 's/^/| /' conftest.$ac_ext >&5
2268522691
22686- ac_cv_lib_readline_readline=no
22692+
2268722693fi
2268822694
2268922695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
2269022696 conftest$ac_exeext conftest.$ac_ext
22691- LIBS=$ac_check_lib_save_LIBS
22692- fi
22693- { echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22694- echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
22695- if test $ac_cv_lib_readline_readline = yes; then
22696- cat >>confdefs.h <<_ACEOF
22697- #define HAVE_LIBREADLINE 1
22698- _ACEOF
22699-
22700- LIBS="-lreadline $LIBS"
22701-
22702- fi
22703-
22704- if test "$ac_cv_have_readline_readline" = no
22705- then
22706-
22707- { echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22708- echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
22709- if test "${ac_cv_lib_termcap_readline+set}" = set; then
22710- echo $ECHO_N "(cached) $ECHO_C" >&6
22711- else
22712- ac_check_lib_save_LIBS=$LIBS
22713- LIBS="-ltermcap $LIBS"
22714- cat >conftest.$ac_ext <<_ACEOF
22715- /* confdefs.h. */
22716- _ACEOF
22717- cat confdefs.h >>conftest.$ac_ext
22718- cat >>conftest.$ac_ext <<_ACEOF
22719- /* end confdefs.h. */
22720-
22721- /* Override any GCC internal prototype to avoid an error.
22722- Use char because int might match the return type of a GCC
22723- builtin and then its argument prototype would still apply. */
22724- #ifdef __cplusplus
22725- extern "C"
22726- #endif
22727- char readline ();
22728- int
22729- main ()
22730- {
22731- return readline ();
22732- ;
22733- return 0;
22734- }
22735- _ACEOF
22736- rm -f conftest.$ac_objext conftest$ac_exeext
22737- if { (ac_try="$ac_link"
22738- case "(($ac_try" in
22739- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22740- *) ac_try_echo=$ac_try;;
22741- esac
22742- eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22743- (eval "$ac_link") 2>conftest.er1
22744- ac_status=$?
22745- grep -v '^ *+' conftest.er1 >conftest.err
22746- rm -f conftest.er1
22747- cat conftest.err >&5
22748- echo "$as_me:$LINENO: \$? = $ac_status" >&5
22749- (exit $ac_status); } && {
22750- test -z "$ac_c_werror_flag" ||
22751- test ! -s conftest.err
22752- } && test -s conftest$ac_exeext &&
22753- $as_test_x conftest$ac_exeext; then
22754- ac_cv_lib_termcap_readline=yes
22697+ if test $py_cv_lib_readline = yes; then
22698+ break
22699+ fi
22700+ done
22701+ # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
22702+ #AC_SUBST([READLINE_LIBS])
22703+ if test $py_cv_lib_readline = !yes; then
22704+ { echo "$as_me:$LINENO: result: none" >&5
22705+ echo "${ECHO_T}none" >&6; }
2275522706else
22756- echo "$as_me: failed program was: " >&5
22757- sed 's/^/| /' conftest.$ac_ext >&5
22707+ { echo "$as_me:$LINENO: result: $READLINE_LIBS " >&5
22708+ echo "${ECHO_T}$READLINE_LIBS" >&6; }
2275822709
22759- ac_cv_lib_termcap_readline=no
22760- fi
22761-
22762- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22763- conftest$ac_exeext conftest.$ac_ext
22764- LIBS=$ac_check_lib_save_LIBS
22765- fi
22766- { echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22767- echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
22768- if test $ac_cv_lib_termcap_readline = yes; then
22769- cat >>confdefs.h <<_ACEOF
22770- #define HAVE_LIBTERMCAP 1
22710+ cat >>confdefs.h <<\_ACEOF
22711+ #define HAVE_LIBREADLINE 1
2277122712_ACEOF
2277222713
22773- LIBS="-ltermcap $LIBS"
22774-
22775- fi
22776-
2277722714fi
2277822715
2277922716# check for readline 2.1
@@ -22783,7 +22720,7 @@ if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
2278322720 echo $ECHO_N "(cached) $ECHO_C" >&6
2278422721else
2278522722 ac_check_lib_save_LIBS=$LIBS
22786- LIBS="-lreadline $LIBS"
22723+ LIBS="-lreadline $READLINE_LIBS $LIBS"
2278722724cat >conftest.$ac_ext <<_ACEOF
2278822725/* confdefs.h. */
2278922726_ACEOF
@@ -22911,7 +22848,7 @@ if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
2291122848 echo $ECHO_N "(cached) $ECHO_C" >&6
2291222849else
2291322850 ac_check_lib_save_LIBS=$LIBS
22914- LIBS="-lreadline $LIBS"
22851+ LIBS="-lreadline $READLINE_LIBS $LIBS"
2291522852cat >conftest.$ac_ext <<_ACEOF
2291622853/* confdefs.h. */
2291722854_ACEOF
@@ -22982,7 +22919,7 @@ if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; th
2298222919 echo $ECHO_N "(cached) $ECHO_C" >&6
2298322920else
2298422921 ac_check_lib_save_LIBS=$LIBS
22985- LIBS="-lreadline $LIBS"
22922+ LIBS="-lreadline $READLINE_LIBS $LIBS"
2298622923cat >conftest.$ac_ext <<_ACEOF
2298722924/* confdefs.h. */
2298822925_ACEOF
@@ -23053,7 +22990,7 @@ if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
2305322990 echo $ECHO_N "(cached) $ECHO_C" >&6
2305422991else
2305522992 ac_check_lib_save_LIBS=$LIBS
23056- LIBS="-lreadline $LIBS"
22993+ LIBS="-lreadline $READLINE_LIBS $LIBS"
2305722994cat >conftest.$ac_ext <<_ACEOF
2305822995/* confdefs.h. */
2305922996_ACEOF
0 commit comments