[Python-checkins] CVS: python/dist/src acconfig.h,1.56,1.57 configure,1.253,1.254 configure.in,1.261,1.262 pyconfig.h.in,1.11,1.12
Martin v. L?wis
loewis@users.sourceforge.net
Sun, 30 Sep 2001 14:10:01 -0700
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv18073
Modified Files:
acconfig.h configure configure.in pyconfig.h.in
Log Message:
Patch #462122: add readline startup and pre_event hooks.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** acconfig.h 2001/09/10 14:10:53 1.56
--- acconfig.h 2001/09/30 21:09:58 1.57
***************
*** 88,91 ****
--- 88,94 ----
#undef HAVE_PTH
+ /* Define if you have readline 4.0 */
+ #undef HAVE_RL_PRE_INPUT_HOOK
+
/* Define if you have readline 4.2 */
#undef HAVE_RL_COMPLETION_MATCHES
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.253
retrieving revision 1.254
diff -C2 -d -r1.253 -r1.254
*** configure 2001/09/28 15:59:37 1.253
--- configure 2001/09/30 21:09:58 1.254
***************
*** 7028,7034 ****
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
ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--- 7028,7079 ----
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: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
***************
*** 7038,7042 ****
LIBS="-lreadline -ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
! #line 7041 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
--- 7083,7087 ----
LIBS="-lreadline -ltermcap $LIBS"
cat > conftest.$ac_ext <<EOF
! #line 7086 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
***************
*** 7049,7053 ****
; 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"
--- 7094,7098 ----
; return 0; }
EOF
! 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"
***************
*** 7074,7078 ****
echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
! echo "configure:7077: checking for broken nice()" >&5
if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
--- 7119,7123 ----
echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
! 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
***************
*** 7083,7087 ****
else
cat > conftest.$ac_ext <<EOF
! #line 7086 "configure"
#include "confdefs.h"
--- 7128,7132 ----
else
cat > conftest.$ac_ext <<EOF
! #line 7131 "configure"
#include "confdefs.h"
***************
*** 7095,7099 ****
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
then
ac_cv_broken_nice=yes
--- 7140,7144 ----
EOF
! 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
***************
*** 7126,7135 ****
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:7129: 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"
#include "confdefs.h"
#include <sys/types.h>
--- 7171,7180 ----
EOF
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! 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 7179 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 7180,7184 ****
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
for dir in $SRCDIRS; do
if test ! -d $dir; then
--- 7225,7229 ----
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7228: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.261
retrieving revision 1.262
diff -C2 -d -r1.261 -r1.262
*** configure.in 2001/09/28 15:59:38 1.261
--- configure.in 2001/09/30 21:09:58 1.262
***************
*** 1833,1836 ****
--- 1833,1840 ----
fi
+ # check for readline 4.0
+ AC_CHECK_LIB(readline, rl_pre_input_hook,
+ AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK), , -ltermcap)
+
# check for readline 4.2
AC_CHECK_LIB(readline, rl_completion_matches,
Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** pyconfig.h.in 2001/09/10 14:10:54 1.11
--- pyconfig.h.in 2001/09/30 21:09:58 1.12
***************
*** 150,153 ****
--- 150,156 ----
#undef HAVE_PTH
+ /* Define if you have readline 4.0 */
+ #undef HAVE_RL_PRE_INPUT_HOOK
+
/* Define if you have readline 4.2 */
#undef HAVE_RL_COMPLETION_MATCHES