mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Remove traces of Py_USING_UNICODE and Unicode-specific conditionals in configure.
Rename --enable-unicode to --with-wide-unicode; the default is still not wide.
This commit is contained in:
parent
22ec03c286
commit
52d168a995
9 changed files with 93 additions and 132 deletions
106
configure
vendored
106
configure
vendored
|
@ -1,5 +1,5 @@
|
|||
#! /bin/sh
|
||||
# From configure.in Revision: 59625 .
|
||||
# From configure.in Revision: 59826 .
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.61 for python 3.0.
|
||||
#
|
||||
|
@ -728,7 +728,6 @@ HAVE_GETHOSTBYNAME_R
|
|||
HAVE_GETHOSTBYNAME
|
||||
LIBM
|
||||
LIBC
|
||||
UNICODE_OBJS
|
||||
THREADHEADERS
|
||||
SRCDIRS
|
||||
LTLIBOBJS'
|
||||
|
@ -1321,8 +1320,6 @@ Optional Features:
|
|||
--enable-toolbox-glue disable/enable MacOSX glue code for extensions
|
||||
--enable-ipv6 Enable ipv6 (with ipv4) support
|
||||
--disable-ipv6 Disable ipv6 support
|
||||
--enable-unicode[=ucs[24]]
|
||||
Enable Unicode strings (default is yes)
|
||||
|
||||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
|
@ -1349,6 +1346,7 @@ Optional Packages:
|
|||
--with-fpectl enable SIGFPE catching
|
||||
--with-libm=STRING math library
|
||||
--with-libc=STRING C library
|
||||
--with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
|
||||
|
||||
Some influential environment variables:
|
||||
CC C compiler command
|
||||
|
@ -21481,95 +21479,76 @@ fi
|
|||
echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
|
||||
echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
|
||||
# Check whether --enable-unicode was given.
|
||||
if test "${enable_unicode+set}" = set; then
|
||||
enableval=$enable_unicode;
|
||||
{ echo "$as_me:$LINENO: checking what type to use for str" >&5
|
||||
echo $ECHO_N "checking what type to use for str... $ECHO_C" >&6; }
|
||||
|
||||
# Check whether --with-wide-unicode was given.
|
||||
if test "${with_wide_unicode+set}" = set; then
|
||||
withval=$with_wide_unicode;
|
||||
if test "$withval" != no
|
||||
then unicode_size="4"
|
||||
else unicode_size="2"
|
||||
fi
|
||||
|
||||
else
|
||||
enable_unicode=yes
|
||||
fi
|
||||
|
||||
case "$have_ucs4_tcl" in
|
||||
yes) unicode_size="4" ;;
|
||||
*) unicode_size="2" ;;
|
||||
esac
|
||||
|
||||
if test $enable_unicode = yes
|
||||
then
|
||||
# Without any arguments, Py_UNICODE defaults to two-byte mode
|
||||
case "$have_ucs4_tcl" in
|
||||
yes) enable_unicode="ucs4"
|
||||
;;
|
||||
*) enable_unicode="ucs2"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
|
||||
case "$enable_unicode" in
|
||||
ucs2) unicode_size="2"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define Py_UNICODE_SIZE 2
|
||||
_ACEOF
|
||||
|
||||
;;
|
||||
ucs4) unicode_size="4"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
case "$unicode_size" in
|
||||
4) cat >>confdefs.h <<\_ACEOF
|
||||
#define Py_UNICODE_SIZE 4
|
||||
_ACEOF
|
||||
|
||||
;;
|
||||
;;
|
||||
*) cat >>confdefs.h <<\_ACEOF
|
||||
#define Py_UNICODE_SIZE 2
|
||||
_ACEOF
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test "$enable_unicode" = "no"
|
||||
then
|
||||
UNICODE_OBJS=""
|
||||
{ echo "$as_me:$LINENO: result: not used" >&5
|
||||
echo "${ECHO_T}not used" >&6; }
|
||||
else
|
||||
UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define Py_USING_UNICODE 1
|
||||
_ACEOF
|
||||
|
||||
|
||||
# wchar_t is only usable if it maps to an unsigned type
|
||||
if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
|
||||
# wchar_t is only usable if it maps to an unsigned type
|
||||
if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
|
||||
-a "$ac_cv_wchar_t_signed" = "no"
|
||||
then
|
||||
PY_UNICODE_TYPE="wchar_t"
|
||||
then
|
||||
PY_UNICODE_TYPE="wchar_t"
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_USABLE_WCHAR_T 1
|
||||
_ACEOF
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define PY_UNICODE_TYPE wchar_t
|
||||
_ACEOF
|
||||
|
||||
elif test "$ac_cv_sizeof_short" = "$unicode_size"
|
||||
then
|
||||
PY_UNICODE_TYPE="unsigned short"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
elif test "$ac_cv_sizeof_short" = "$unicode_size"
|
||||
then
|
||||
PY_UNICODE_TYPE="unsigned short"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define PY_UNICODE_TYPE unsigned short
|
||||
_ACEOF
|
||||
|
||||
elif test "$ac_cv_sizeof_long" = "$unicode_size"
|
||||
then
|
||||
PY_UNICODE_TYPE="unsigned long"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
elif test "$ac_cv_sizeof_long" = "$unicode_size"
|
||||
then
|
||||
PY_UNICODE_TYPE="unsigned long"
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define PY_UNICODE_TYPE unsigned long
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
PY_UNICODE_TYPE="no type found"
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
|
||||
echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
|
||||
else
|
||||
PY_UNICODE_TYPE="no type found"
|
||||
fi
|
||||
{ echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
|
||||
echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
|
||||
|
||||
# check for endianness
|
||||
{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
|
||||
|
@ -24432,13 +24411,12 @@ HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
|
|||
HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
|
||||
LIBM!$LIBM$ac_delim
|
||||
LIBC!$LIBC$ac_delim
|
||||
UNICODE_OBJS!$UNICODE_OBJS$ac_delim
|
||||
THREADHEADERS!$THREADHEADERS$ac_delim
|
||||
SRCDIRS!$SRCDIRS$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 18; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue