Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(162087)

Side by Side Diff: configure.in

Issue 7652: Merge C version of decimal into py3k.
Patch Set: Created 7 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « configure ('k') | Doc/library/numeric.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 # Set VERSION so we only need to edit in one place (i.e., here) 5 # Set VERSION so we only need to edit in one place (i.e., here)
6 m4_define(PYTHON_VERSION, 3.3) 6 m4_define(PYTHON_VERSION, 3.3)
7 7
8 AC_PREREQ(2.65) 8 AC_PREREQ(2.65)
9 9
10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) 10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 AC_TYPE_PID_T 1457 AC_TYPE_PID_T
1458 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) 1458 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void])
1459 AC_TYPE_SIZE_T 1459 AC_TYPE_SIZE_T
1460 AC_TYPE_UID_T 1460 AC_TYPE_UID_T
1461 AC_TYPE_UINT32_T 1461 AC_TYPE_UINT32_T
1462 AC_TYPE_UINT64_T 1462 AC_TYPE_UINT64_T
1463 AC_TYPE_INT32_T 1463 AC_TYPE_INT32_T
1464 AC_TYPE_INT64_T 1464 AC_TYPE_INT64_T
1465 AC_CHECK_TYPE(ssize_t, 1465 AC_CHECK_TYPE(ssize_t,
1466 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,) 1466 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,)
1467 AC_CHECK_TYPE(__uint128_t,
1468 AC_DEFINE(HAVE_GCC_UINT128_T, 1, [Define if your compiler provides __uint128_t ]),,)
1467 1469
1468 # Sizes of various common basic types 1470 # Sizes of various common basic types
1469 # ANSI C requires sizeof(char) == 1, so no need to check it 1471 # ANSI C requires sizeof(char) == 1, so no need to check it
1470 AC_CHECK_SIZEOF(int, 4) 1472 AC_CHECK_SIZEOF(int, 4)
1471 AC_CHECK_SIZEOF(long, 4) 1473 AC_CHECK_SIZEOF(long, 4)
1472 AC_CHECK_SIZEOF(void *, 4) 1474 AC_CHECK_SIZEOF(void *, 4)
1473 AC_CHECK_SIZEOF(short, 2) 1475 AC_CHECK_SIZEOF(short, 2)
1474 AC_CHECK_SIZEOF(float, 4) 1476 AC_CHECK_SIZEOF(float, 4)
1475 AC_CHECK_SIZEOF(double, 8) 1477 AC_CHECK_SIZEOF(double, 8)
1476 AC_CHECK_SIZEOF(fpos_t, 4) 1478 AC_CHECK_SIZEOF(fpos_t, 4)
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3285 [ 3287 [
3286 if test "$withval" = no 3288 if test "$withval" = no
3287 then LIBC= 3289 then LIBC=
3288 AC_MSG_RESULT(force LIBC empty) 3290 AC_MSG_RESULT(force LIBC empty)
3289 elif test "$withval" != yes 3291 elif test "$withval" != yes
3290 then LIBC=$withval 3292 then LIBC=$withval
3291 AC_MSG_RESULT(set LIBC="$withval") 3293 AC_MSG_RESULT(set LIBC="$withval")
3292 else AC_MSG_ERROR([proper usage is --with-libc=STRING]) 3294 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
3293 fi], 3295 fi],
3294 [AC_MSG_RESULT(default LIBC="$LIBC")]) 3296 [AC_MSG_RESULT(default LIBC="$LIBC")])
3297
3298 # **************************************
3299 # * Check for gcc x64 inline assembler *
3300 # **************************************
3301
3302 AC_MSG_CHECKING(for x64 gcc inline assembler)
3303 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
3304 __asm__ __volatile__ ("movq %rcx, %rax");
3305 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
3306 AC_MSG_RESULT($have_gcc_asm_for_x64)
3307 if test "$have_gcc_asm_for_x64" = yes
3308 then
3309 AC_DEFINE(HAVE_GCC_ASM_FOR_X64, 1,
3310 [Define if we can use x64 gcc inline assembler])
3311 fi
3295 3312
3296 # ************************************************** 3313 # **************************************************
3297 # * Check for various properties of floating point * 3314 # * Check for various properties of floating point *
3298 # ************************************************** 3315 # **************************************************
3299 3316
3300 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64) 3317 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
3301 AC_CACHE_VAL(ac_cv_little_endian_double, [ 3318 AC_CACHE_VAL(ac_cv_little_endian_double, [
3302 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 3319 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3303 #include <string.h> 3320 #include <string.h>
3304 int main() { 3321 int main() {
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
4270 4287
4271 AC_SUBST(SRCDIRS) 4288 AC_SUBST(SRCDIRS)
4272 SRCDIRS="Parser Grammar Objects Python Modules Mac" 4289 SRCDIRS="Parser Grammar Objects Python Modules Mac"
4273 AC_MSG_CHECKING(for build directories) 4290 AC_MSG_CHECKING(for build directories)
4274 for dir in $SRCDIRS; do 4291 for dir in $SRCDIRS; do
4275 if test ! -d $dir; then 4292 if test ! -d $dir; then
4276 mkdir $dir 4293 mkdir $dir
4277 fi 4294 fi
4278 done 4295 done
4279 AC_MSG_RESULT(done) 4296 AC_MSG_RESULT(done)
4297
4298 # Availability of -O2:
4299 AC_MSG_CHECKING(for -O2)
4300 saved_cflags="$CFLAGS"
4301 CFLAGS="-O2"
4302 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
4303 ]])],[have_O2=yes],[have_O2=no])
4304 AC_MSG_RESULT($have_O2)
4305 CFLAGS="$saved_cflags"
4306
4307 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
4308 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
4309 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
4310 saved_cflags="$CFLAGS"
4311 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
4312 if test "$have_O2" = no; then
4313 CFLAGS=""
4314 fi
4315 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4316 #include <stdio.h>
4317 #include <stdlib.h>
4318 #include <string.h>
4319 void foo(void *p, void *q) { memmove(p, q, 19); }
4320 int main() {
4321 char a[32] = "123456789000000000";
4322 foo(&a[9], a);
4323 if (strcmp(a, "123456789123456789000000000") != 0)
4324 return 1;
4325 foo(a, &a[9]);
4326 if (strcmp(a, "123456789000000000") != 0)
4327 return 1;
4328 return 0;
4329 }
4330 ]])],
4331 [have_glibc_memmove_bug=no],
4332 [have_glibc_memmove_bug=yes],
4333 [have_glibc_memmove_bug=undefined])
4334 CFLAGS="$saved_cflags"
4335 AC_MSG_RESULT($have_glibc_memmove_bug)
4336 if test "$have_glibc_memmove_bug" = yes; then
4337 AC_DEFINE(HAVE_GLIBC_MEMMOVE_BUG, 1,
4338 [Define if glibc has incorrect _FORTIFY_SOURCE wrappers
4339 for memmove and bcopy.])
4340 fi
4341
4342 if test "$have_gcc_asm_for_x87" = yes; then
4343 # Some versions of gcc miscompile inline asm:
4344 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
4345 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
4346 case $CC in
4347 *gcc*)
4348 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
4349 saved_cflags="$CFLAGS"
4350 CFLAGS="-O2"
4351 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4352 __attribute__((noinline)) int
4353 foo(int *p) {
4354 int r;
4355 asm ( "movl \$6, (%1)\n\t"
4356 "xorl %0, %0\n\t"
4357 : "=r" (r) : "r" (p) : "memory"
4358 );
4359 return r;
4360 }
4361 int main() {
4362 int p = 8;
4363 if ((foo(&p) ? : p) != 6)
4364 return 1;
4365 return 0;
4366 }
4367 ]])],
4368 [have_ipa_pure_const_bug=no],
4369 [have_ipa_pure_const_bug=yes],
4370 [have_ipa_pure_const_bug=undefined])
4371 CFLAGS="$saved_cflags"
4372 AC_MSG_RESULT($have_ipa_pure_const_bug)
4373 if test "$have_ipa_pure_const_bug" = yes; then
4374 AC_DEFINE(HAVE_IPA_PURE_CONST_BUG, 1,
4375 [Define if gcc has the ipa-pure-const bug.])
4376 fi
4377 ;;
4378 esac
4379 fi
4280 4380
4281 # generate output files 4381 # generate output files
4282 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) 4382 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
4283 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) 4383 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
4284 AC_OUTPUT 4384 AC_OUTPUT
4285 4385
4286 echo "creating Modules/Setup" 4386 echo "creating Modules/Setup"
4287 if test ! -f Modules/Setup 4387 if test ! -f Modules/Setup
4288 then 4388 then
4289 cp $srcdir/Modules/Setup.dist Modules/Setup 4389 cp $srcdir/Modules/Setup.dist Modules/Setup
4290 fi 4390 fi
4291 4391
4292 echo "creating Modules/Setup.local" 4392 echo "creating Modules/Setup.local"
4293 if test ! -f Modules/Setup.local 4393 if test ! -f Modules/Setup.local
4294 then 4394 then
4295 echo "# Edit this file for local setup changes" >Modules/Setup.local 4395 echo "# Edit this file for local setup changes" >Modules/Setup.local
4296 fi 4396 fi
4297 4397
4298 echo "creating Makefile" 4398 echo "creating Makefile"
4299 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4399 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4300 -s Modules Modules/Setup.config \ 4400 -s Modules Modules/Setup.config \
4301 Modules/Setup.local Modules/Setup 4401 Modules/Setup.local Modules/Setup
4302 mv config.c Modules 4402 mv config.c Modules
OLDNEW
« no previous file with comments | « configure ('k') | Doc/library/numeric.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+