diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-03-18 20:06:12 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-03-18 20:06:12 (GMT) |
commit | bd7926478de92a2a0ef4440e1a9ae61b706a80d2 (patch) | |
tree | f92ef0133e96195e1875cc74b046474aeb7be155 /configure.in | |
parent | e7f45b8e5948d7367c3754b0506b082d1296138f (diff) | |
download | cpython-bd7926478de92a2a0ef4440e1a9ae61b706a80d2.zip cpython-bd7926478de92a2a0ef4440e1a9ae61b706a80d2.tar.gz cpython-bd7926478de92a2a0ef4440e1a9ae61b706a80d2.tar.bz2 |
Issue #4258: Make it possible to use 30-bit digits for PyLongs:
- new configure option --enable-big-digits
- new structseq sys.int_info giving information about the internal format
By default, 30-bit digits are enabled on 64-bit machines but
disabled on 32-bit machines.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.in b/configure.in index a29a4c5..f57c8ae 100644 --- a/configure.in +++ b/configure.in @@ -1288,6 +1288,10 @@ AC_TYPE_PID_T AC_TYPE_SIGNAL AC_TYPE_SIZE_T AC_TYPE_UID_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_INT32_T +AC_TYPE_INT64_T AC_CHECK_TYPE(ssize_t, AC_DEFINE(HAVE_SSIZE_T, 1, Define if your compiler provides ssize_t),,) @@ -3125,6 +3129,25 @@ AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]]) LIBS=$LIBS_SAVE +# determine what size digit to use for Python's longs +AC_MSG_CHECKING([digit size for Python's longs]) +AC_ARG_ENABLE(big-digits, +AC_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python longs [[BITS=30]]]), +[case $enable_big_digits in +yes) + enable_big_digits=30 ;; +no) + enable_big_digits=15 ;; +[15|30]) + ;; +*) + AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;; +esac +AC_MSG_RESULT($enable_big_digits) +AC_DEFINE_UNQUOTED(PYLONG_BITS_IN_DIGIT, $enable_big_digits, [Define as the preferred size in bits of long digits]) +], +[AC_MSG_RESULT(no value specified)]) + # check for wchar.h AC_CHECK_HEADER(wchar.h, [ AC_DEFINE(HAVE_WCHAR_H, 1, |