diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-11-26 20:35:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-11-26 20:35:12 (GMT) |
commit | d1e22ba7db9d8668c486eb77999bbbbdca8b09d3 (patch) | |
tree | 6a5b823ea0994796e3a3abd5489b4056cfd273b7 /configure | |
parent | 810aa6db3472e48e182b185cc4375615977c85f5 (diff) | |
download | cpython-d1e22ba7db9d8668c486eb77999bbbbdca8b09d3.zip cpython-d1e22ba7db9d8668c486eb77999bbbbdca8b09d3.tar.gz cpython-d1e22ba7db9d8668c486eb77999bbbbdca8b09d3.tar.bz2 |
only support append_history if readline has it
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -14529,6 +14529,49 @@ rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5 +$as_echo_n "checking for append_history in -lreadline... " >&6; } +if ${ac_cv_lib_readline_append_history+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lreadline $READLINE_LIBS $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char append_history (); +int +main () +{ +return append_history (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_readline_append_history=yes +else + ac_cv_lib_readline_append_history=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5 +$as_echo "$ac_cv_lib_readline_append_history" >&6; } +if test "x$ac_cv_lib_readline_append_history" = xyes; then : + +$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h + +fi + + # End of readline checks: restore LIBS LIBS=$LIBS_no_readline |