[Python-checkins] CVS: python/dist/src acconfig.h,1.49,1.50 config.h.in,2.97,2.98 configure,1.215,1.216 configure.in,1.223,1.224

Guido van Rossum gvanrossum@users.sourceforge.net
2001年7月10日 09:44:37 -0700


Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv15227
Modified Files:
	acconfig.h config.h.in configure configure.in 
Log Message:
SF Patch #432457 by Jason Tishler: support for readline 4.2.
This patch allows the readline module to build cleanly with GNU
readline 4.2 without breaking the build for earlier GNU readline
versions. The configure script checks for the presence of
rl_completion_matches in libreadline.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** acconfig.h	2001年06月26日 22:22:36	1.49
--- acconfig.h	2001年07月10日 16:44:35	1.50
***************
*** 87,90 ****
--- 87,93 ----
 #undef HAVE_PTH
 
+ /* Define if you have readline 4.2 */
+ #undef HAVE_RL_COMPLETION_MATCHES
+ 
 /* Define if your compiler supports variable length function prototypes
 (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/config.h.in,v
retrieving revision 2.97
retrieving revision 2.98
diff -C2 -r2.97 -r2.98
*** config.h.in	2001年06月26日 22:22:36	2.97
--- config.h.in	2001年07月10日 16:44:35	2.98
***************
*** 149,152 ****
--- 149,155 ----
 #undef HAVE_PTH
 
+ /* Define if you have readline 4.2 */
+ #undef HAVE_RL_COMPLETION_MATCHES
+ 
 /* Define if your compiler supports variable length function prototypes
 (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
***************
*** 297,303 ****
 #undef SIZEOF_WCHAR_T
 
- /* Define if you have the _getpty function. */
- #undef HAVE__GETPTY
- 
 /* Define if you have the alarm function. */
 #undef HAVE_ALARM
--- 300,303 ----
***************
*** 393,396 ****
--- 393,399 ----
 #undef HAVE_GETPID
 
+ /* Define if you have the _getpty function. */
+ #undef HAVE__GETPTY
+ 
 /* Define if you have the getpwent function. */
 #undef HAVE_GETPWENT
***************
*** 555,566 ****
 #undef HAVE_WAITPID
 
! /* Define if you have the <db.h> header file. */
! #undef HAVE_DB_H
 
 /* Define if you have the <db1/ndbm.h> header file. */
 #undef HAVE_DB1_NDBM_H
 
! /* Define if you have the <db_185.h> header file. */
! #undef HAVE_DB_185_H
 
 /* Define if you have the <dirent.h> header file. */
--- 558,569 ----
 #undef HAVE_WAITPID
 
! /* Define if you have the <db_185.h> header file. */
! #undef HAVE_DB_185_H
 
 /* Define if you have the <db1/ndbm.h> header file. */
 #undef HAVE_DB1_NDBM_H
 
! /* Define if you have the <db.h> header file. */
! #undef HAVE_DB_H
 
 /* Define if you have the <dirent.h> header file. */
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.215
retrieving revision 1.216
diff -C2 -r1.215 -r1.216
*** configure	2001年06月27日 20:22:04	1.215
--- configure	2001年07月10日 16:44:35	1.216
***************
*** 1,5 ****
 #! /bin/sh
 
! # From configure.in Revision: 1.222 
 
 # Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
 #! /bin/sh
 
! # From configure.in Revision: 1.224 
 
 # Guess values for system-dependent variables and create Makefiles.
***************
*** 6815,6818 ****
--- 6815,6863 ----
 fi
 
+ # check for readline 4.2
+ echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
+ echo "configure:6820: 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
+ echo $ac_n "(cached) $ac_c" 1>&6
+ else
+ ac_save_LIBS="$LIBS"
+ LIBS="-lreadline -ltermcap $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 6828 "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_completion_matches();
+ 
+ int main() {
+ rl_completion_matches()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:6839: \"$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_COMPLETION_MATCHES 1
+ EOF
+ 
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ 
+ 
 # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
 # Add sys/socket.h to confdefs.h
***************
*** 6823,6832 ****
 EOF
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6826: 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 6831 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
--- 6868,6877 ----
 EOF
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:6871: 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 6876 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
***************
*** 6877,6881 ****
 SRCDIRS="Parser Grammar Objects Python Modules"
 echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6880: checking for build directories" >&5
 for dir in $SRCDIRS; do
 if test ! -d $dir; then
--- 6922,6926 ----
 SRCDIRS="Parser Grammar Objects Python Modules"
 echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6925: 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.223
retrieving revision 1.224
diff -C2 -r1.223 -r1.224
*** configure.in	2001年06月27日 20:22:04	1.223
--- configure.in	2001年07月10日 16:44:35	1.224
***************
*** 1662,1665 ****
--- 1662,1669 ----
 fi
 
+ # check for readline 4.2
+ AC_CHECK_LIB(readline, rl_completion_matches,
+ 	AC_DEFINE(HAVE_RL_COMPLETION_MATCHES), , -ltermcap)
+ 
 # THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
 # Add sys/socket.h to confdefs.h

AltStyle によって変換されたページ (->オリジナル) /