File python-2.7rc2-configure.patch of Package python-base.import4508

Index: configure.in
===================================================================
--- configure.in.orig
+++ configure.in
@@ -3892,9 +3892,18 @@ then
 fi
 
 # check for readline 4.0
-AC_CHECK_LIB(readline, rl_pre_input_hook,
-	AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
-        [Define if you have readline 4.0]), ,$READLINE_LIBS)
+AC_MSG_CHECKING([for rl_pre_input_hook in -lreadline])
+AC_CACHE_VAL(ac_cv_have_rl_re_input_hook, [
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>
+#include <readline/readline.h>],
+				   [return rl_pre_input_hook != 0])],
+		  ac_cv_have_rl_re_input_hook=yes,
+		  ac_cv_have_rl_re_input_hook=no)])
+AC_MSG_RESULT($ac_cv_have_rl_re_input_hook)
+if test "$ac_cv_have_rl_re_input_hook" = yes; then
+  AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
+            [Define if you have readline 4.0])
+fi
 
 # also in 4.0
 AC_CHECK_LIB(readline, rl_completion_display_matches_hook,
openSUSE Build Service is sponsored by