Index: configure =================================================================== --- configure (revision 78019) +++ configure (working copy) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 77587 . +# From configure.in Revision: 77588 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 2.7. # @@ -26503,6 +26503,77 @@ fi +# check for readline 'completion_matches' +{ echo "$as_me:$LINENO: checking for completion_matches in -lreadline" >&5 +echo $ECHO_N "checking for completion_matches in -lreadline... $ECHO_C" >&6; } +if test "${ac_cv_lib_readline_completion_matches+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lreadline $READLINE_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* 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 completion_matches (); +int +main () +{ +return completion_matches (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_readline_completion_matches=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_readline_completion_matches=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_completion_matches" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_completion_matches" >&6; } +if test $ac_cv_lib_readline_completion_matches = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COMPLETION_MATCHES 1 +_ACEOF + +fi + + # End of readline checks: restore LIBS LIBS=$LIBS_no_readline Index: configure.in =================================================================== --- configure.in (revision 78019) +++ configure.in (working copy) @@ -3832,6 +3832,11 @@ [Define if you can turn off readline's signal handling.]), ) fi +# check for readline 'completion_matches' +AC_CHECK_LIB(readline, completion_matches, + AC_DEFINE(HAVE_COMPLETION_MATCHES, 1, + [Define if you have readline completion_matches]), ,$READLINE_LIBS) + # End of readline checks: restore LIBS LIBS=$LIBS_no_readline Index: Modules/readline.c =================================================================== --- Modules/readline.c (revision 78019) +++ Modules/readline.c (working copy) @@ -35,12 +35,14 @@ #define completion_matches(x, y) \ rl_completion_matches((x), ((rl_compentry_func_t *)(y))) #else +#ifndef HAVE_COMPLETION_MATCHES #if defined(_RL_FUNCTION_TYPEDEF) extern char **completion_matches(char *, rl_compentry_func_t *); #else extern char **completion_matches(char *, CPFunction *); #endif #endif +#endif #ifdef __APPLE__ /* Index: pyconfig.h.in =================================================================== --- pyconfig.h.in (revision 78019) +++ pyconfig.h.in (working copy) @@ -103,6 +103,9 @@ /* Define to 1 if you have the `clock' function. */ #undef HAVE_CLOCK +/* Define if you have readline completion_matches */ +#undef HAVE_COMPLETION_MATCHES + /* Define to 1 if you have the `confstr' function. */ #undef HAVE_CONFSTR