[issue4258] Use 30-bit digits instead of 15-bit digits for Python integers. - Code Review (original) (raw)
OLD
NEW
1 dnl ***********************************************
1 dnl ***********************************************
2 dnl * Please run autoreconf to test your changes! *
2 dnl * Please run autoreconf to test your changes! *
3 dnl ***********************************************
3 dnl ***********************************************
4 dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.61).
4 dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.61).
5
5
6 # Set VERSION so we only need to edit in one place (i.e., here)
6 # Set VERSION so we only need to edit in one place (i.e., here)
7 m4_define(PYTHON_VERSION, 3.1)
7 m4_define(PYTHON_VERSION, 3.1)
8
8
9 AC_REVISION($Revision: 68924 $)
9 AC_REVISION($Revision: 68924 $)
10 AC_PREREQ(2.61)
10 AC_PREREQ(2.61)
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading...
1281 #endif
1281 #endif
1282 EOF
1282 EOF
1283
1283
1284 # Type availability checks
1284 # Type availability checks
1285 AC_TYPE_MODE_T
1285 AC_TYPE_MODE_T
1286 AC_TYPE_OFF_T
1286 AC_TYPE_OFF_T
1287 AC_TYPE_PID_T
1287 AC_TYPE_PID_T
1288 AC_TYPE_SIGNAL
1288 AC_TYPE_SIGNAL
1289 AC_TYPE_SIZE_T
1289 AC_TYPE_SIZE_T
1290 AC_TYPE_UID_T
1290 AC_TYPE_UID_T
1291 AC_TYPE_UINT32_T
1292 AC_TYPE_UINT64_T
1293 AC_TYPE_INT32_T
1294 AC_TYPE_INT64_T
1291 AC_CHECK_TYPE(ssize_t,
1295 AC_CHECK_TYPE(ssize_t,
1292 AC_DEFINE(HAVE_SSIZE_T, 1, Define if your compiler provides ssize_t),,)
1296 AC_DEFINE(HAVE_SSIZE_T, 1, Define if your compiler provides ssize_t),,)
1293
1297
1294 # Sizes of various common basic types
1298 # Sizes of various common basic types
1295 # ANSI C requires sizeof(char) == 1, so no need to check it
1299 # ANSI C requires sizeof(char) == 1, so no need to check it
1296 AC_CHECK_SIZEOF(int, 4)
1300 AC_CHECK_SIZEOF(int, 4)
1297 AC_CHECK_SIZEOF(long, 4)
1301 AC_CHECK_SIZEOF(long, 4)
1298 AC_CHECK_SIZEOF(void *, 4)
1302 AC_CHECK_SIZEOF(void *, 4)
1299 AC_CHECK_SIZEOF(short, 2)
1303 AC_CHECK_SIZEOF(short, 2)
1300 AC_CHECK_SIZEOF(float, 4)
1304 AC_CHECK_SIZEOF(float, 4)
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading...
3118 then
3122 then
3119 AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
3123 AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
3120 [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
3124 [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
3121 fi
3125 fi
3122
3126
3123 AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p])
3127 AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p])
3124 AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
3128 AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
3125
3129
3126 LIBS=$LIBS_SAVE
3130 LIBS=$LIBS_SAVE
3127
3131
3132 # determine what size digit to use for Python's longs
3133 AC_MSG_CHECKING([digit size for Python's longs])
3134 AC_ARG_ENABLE(big-digits,
3135 AC_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python lon gs [[BITS=30]]]),
3136 [case $enable_big_digits in
3137 yes)
3138 enable_big_digits=30 ;;
3139 no)
3140 enable_big_digits=15 ;;
3141 [15|30])
3142 ;;
3143 *)
3144 AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value shou ld be 15 or 30]) ;;
3145 esac
3146 AC_MSG_RESULT($enable_big_digits)
3147 AC_DEFINE_UNQUOTED(PYLONG_DIGIT_SIZE, $enable_big_digits, [Define as the preferr ed size in bits of long digits])
3148 ],
3149 [AC_MSG_RESULT(no value specified)])
3150
3128 # check for wchar.h
3151 # check for wchar.h
3129 AC_CHECK_HEADER(wchar.h, [
3152 AC_CHECK_HEADER(wchar.h, [
3130 AC_DEFINE(HAVE_WCHAR_H, 1,·
3153 AC_DEFINE(HAVE_WCHAR_H, 1,·
3131 [Define if the compiler provides a wchar.h header file.])·
3154 [Define if the compiler provides a wchar.h header file.])·
3132 wchar_h="yes"
3155 wchar_h="yes"
3133 ],
3156 ],
3134 wchar_h="no"
3157 wchar_h="no"
3135 )
3158 )
3136
3159
3137 # determine wchar_t size
3160 # determine wchar_t size
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading...
3707 if test ! -f Modules/Setup.local
3730 if test ! -f Modules/Setup.local
3708 then
3731 then
3709 echo "# Edit this file for local setup changes" >Modules/Setup.local
3732 echo "# Edit this file for local setup changes" >Modules/Setup.local
3710 fi
3733 fi
3711
3734
3712 echo "creating Makefile"
3735 echo "creating Makefile"
3713 SHELLSHELL SHELLsrcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
3736 SHELLSHELL SHELLsrcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
3714 -s Modules Modules/Setup.config \
3737 -s Modules Modules/Setup.config \
3715 Modules/Setup.local Modules/Setup
3738 Modules/Setup.local Modules/Setup
3716 mv config.c Modules
3739 mv config.c Modules
OLD
NEW