[Python-checkins] CVS: python/dist/src Makefile.pre.in,1.52,1.53 configure,1.239,1.240 configure.in,1.247,1.248 setup.py,1.49,1.50

Martin v. L?wis loewis@users.sourceforge.net
2001年8月17日 11:39:26 -0700


Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv28889
Modified Files:
	Makefile.pre.in configure configure.in setup.py 
Log Message:
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
Index: Makefile.pre.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** Makefile.pre.in	2001年08月17日 15:32:31	1.52
--- Makefile.pre.in	2001年08月17日 18:39:24	1.53
***************
*** 148,151 ****
--- 148,152 ----
 DYNLOADFILE=	@DYNLOADFILE@
 MACHDEP_OBJS=	@MACHDEP_OBJS@
+ UNICODE_OBJS= @UNICODE_OBJS@
 
 PYTHON=		python$(EXE)
***************
*** 264,269 ****
 		Objects/tupleobject.o \
 		Objects/typeobject.o \
! 		Objects/unicodeobject.o \
! 		Objects/unicodectype.o
 
 
--- 265,269 ----
 		Objects/tupleobject.o \
 		Objects/typeobject.o \
! 		$(UNICODE_OBJS)
 
 
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.239
retrieving revision 1.240
diff -C2 -d -r1.239 -r1.240
*** configure	2001年08月16日 13:14:59	1.239
--- configure	2001年08月17日 18:39:24	1.240
***************
*** 6694,6701 ****
--- 6694,6704 ----
 esac
 
+ 
 if test "$enable_unicode" = "no"
 then
+ UNICODE_OBJS=""
 echo "$ac_t""not used" 1>&6
 else
+ UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
 cat >> confdefs.h <<\EOF
 #define Py_USING_UNICODE 1
***************
*** 6735,6739 ****
 # check for endianness
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:6738: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
--- 6738,6742 ----
 # check for endianness
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
! echo "configure:6741: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 6742,6746 ****
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
! #line 6745 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
--- 6745,6749 ----
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
! #line 6748 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
***************
*** 6753,6761 ****
 ; return 0; }
 EOF
! if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 rm -rf conftest*
 # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
! #line 6760 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
--- 6756,6764 ----
 ; return 0; }
 EOF
! if { (eval echo configure:6759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 rm -rf conftest*
 # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
! #line 6763 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
***************
*** 6768,6772 ****
 ; return 0; }
 EOF
! if { (eval echo configure:6771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 rm -rf conftest*
 ac_cv_c_bigendian=yes
--- 6771,6775 ----
 ; return 0; }
 EOF
! if { (eval echo configure:6774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 rm -rf conftest*
 ac_cv_c_bigendian=yes
***************
*** 6788,6792 ****
 else
 cat > conftest.$ac_ext <<EOF
! #line 6791 "configure"
 #include "confdefs.h"
 main () {
--- 6791,6795 ----
 else
 cat > conftest.$ac_ext <<EOF
! #line 6794 "configure"
 #include "confdefs.h"
 main () {
***************
*** 6801,6805 ****
 }
 EOF
! if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
 ac_cv_c_bigendian=no
--- 6804,6808 ----
 }
 EOF
! if { (eval echo configure:6807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
 ac_cv_c_bigendian=no
***************
*** 6828,6832 ****
 # or fills with zeros (like the Cray J90, according to Tim Peters).
 echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
! echo "configure:6831: checking whether right shift extends the sign bit" >&5
 if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
--- 6831,6835 ----
 # or fills with zeros (like the Cray J90, according to Tim Peters).
 echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
! echo "configure:6834: checking whether right shift extends the sign bit" >&5
 if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 6837,6841 ****
 else
 cat > conftest.$ac_ext <<EOF
! #line 6840 "configure"
 #include "confdefs.h"
 
--- 6840,6844 ----
 else
 cat > conftest.$ac_ext <<EOF
! #line 6843 "configure"
 #include "confdefs.h"
 
***************
*** 6846,6850 ****
 
 EOF
! if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
 ac_cv_rshift_extends_sign=yes
--- 6849,6853 ----
 
 EOF
! if { (eval echo configure:6852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
 ac_cv_rshift_extends_sign=yes
***************
*** 6871,6875 ****
 # check for getc_unlocked and related locking functions
 echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
! echo "configure:6874: checking for getc_unlocked() and friends" >&5
 if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
--- 6874,6878 ----
 # check for getc_unlocked and related locking functions
 echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
! echo "configure:6877: checking for getc_unlocked() and friends" >&5
 if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 6877,6881 ****
 
 cat > conftest.$ac_ext <<EOF
! #line 6880 "configure"
 #include "confdefs.h"
 #include <stdio.h>
--- 6880,6884 ----
 
 cat > conftest.$ac_ext <<EOF
! #line 6883 "configure"
 #include "confdefs.h"
 #include <stdio.h>
***************
*** 6889,6893 ****
 ; return 0; }
 EOF
! if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 rm -rf conftest*
 ac_cv_have_getc_unlocked=yes
--- 6892,6896 ----
 ; return 0; }
 EOF
! if { (eval echo configure:6895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 rm -rf conftest*
 ac_cv_have_getc_unlocked=yes
***************
*** 6912,6916 ****
 # check for readline 4.2
 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
! echo "configure:6915: 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
--- 6915,6919 ----
 # check for readline 4.2
 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
! echo "configure:6918: 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
***************
*** 6920,6924 ****
 LIBS="-lreadline -ltermcap $LIBS"
 cat > conftest.$ac_ext <<EOF
! #line 6923 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error. */
--- 6923,6927 ----
 LIBS="-lreadline -ltermcap $LIBS"
 cat > conftest.$ac_ext <<EOF
! #line 6926 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error. */
***************
*** 6931,6935 ****
 ; return 0; }
 EOF
! if { (eval echo configure:6934: \"$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"
--- 6934,6938 ----
 ; return 0; }
 EOF
! if { (eval echo configure:6937: \"$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"
***************
*** 6956,6960 ****
 
 echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
! echo "configure:6959: checking for broken nice()" >&5
 if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
--- 6959,6963 ----
 
 echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
! echo "configure:6962: checking for broken nice()" >&5
 if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
 echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 6965,6969 ****
 else
 cat > conftest.$ac_ext <<EOF
! #line 6968 "configure"
 #include "confdefs.h"
 
--- 6968,6972 ----
 else
 cat > conftest.$ac_ext <<EOF
! #line 6971 "configure"
 #include "confdefs.h"
 
***************
*** 6977,6981 ****
 
 EOF
! if { (eval echo configure:6980: \"$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
--- 6980,6984 ----
 
 EOF
! if { (eval echo configure:6983: \"$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
***************
*** 7008,7017 ****
 EOF
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:7011: 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 7016 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
--- 7011,7020 ----
 EOF
 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
! echo "configure:7014: 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 7019 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
***************
*** 7062,7066 ****
 SRCDIRS="Parser Grammar Objects Python Modules"
 echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7065: checking for build directories" >&5
 for dir in $SRCDIRS; do
 if test ! -d $dir; then
--- 7065,7069 ----
 SRCDIRS="Parser Grammar Objects Python Modules"
 echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7068: checking for build directories" >&5
 for dir in $SRCDIRS; do
 if test ! -d $dir; then
***************
*** 7253,7256 ****
--- 7256,7260 ----
 s%@LIBM@%$LIBM%g
 s%@LIBC@%$LIBC%g
+ s%@UNICODE_OBJS@%$UNICODE_OBJS%g
 s%@SRCDIRS@%$SRCDIRS%g
 
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.247
retrieving revision 1.248
diff -C2 -d -r1.247 -r1.248
*** configure.in	2001年08月15日 17:14:32	1.247
--- configure.in	2001年08月17日 18:39:24	1.248
***************
*** 1681,1688 ****
--- 1681,1691 ----
 esac
 
+ AC_SUBST(UNICODE_OBJS)
 if test "$enable_unicode" = "no"
 then
+ UNICODE_OBJS=""
 AC_MSG_RESULT(not used)
 else
+ UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
 AC_DEFINE(Py_USING_UNICODE)
 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** setup.py	2001年08月16日 20:30:18	1.49
--- setup.py	2001年08月17日 18:39:24	1.50
***************
*** 186,189 ****
--- 186,194 ----
 self.compiler.include_dirs.insert(0, '/usr/local/include' )
 
+ try:
+ have_unicode = unicode
+ except NameError:
+ have_unicode = 0
+ 
 # lib_dirs and inc_dirs are used to search for files;
 # if a file is found in one of those directories, it can
***************
*** 236,240 ****
 exts.append( Extension('_testcapi', ['_testcapimodule.c']) )
 # static Unicode character database
! exts.append( Extension('unicodedata', ['unicodedata.c']) )
 # access to ISO C locale support
 exts.append( Extension('_locale', ['_localemodule.c']) )
--- 241,246 ----
 exts.append( Extension('_testcapi', ['_testcapimodule.c']) )
 # static Unicode character database
! if have_unicode:
! exts.append( Extension('unicodedata', ['unicodedata.c']) )
 # access to ISO C locale support
 exts.append( Extension('_locale', ['_localemodule.c']) )

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