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

Side by Side Diff: configure.in

Issue 7652: Merge C version of decimal into py3k.
Patch Set: Created 7 years, 7 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/decimal.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 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after
3297 [ 3299 [
3298 if test "$withval" = no 3300 if test "$withval" = no
3299 then LIBC= 3301 then LIBC=
3300 AC_MSG_RESULT(force LIBC empty) 3302 AC_MSG_RESULT(force LIBC empty)
3301 elif test "$withval" != yes 3303 elif test "$withval" != yes
3302 then LIBC=$withval 3304 then LIBC=$withval
3303 AC_MSG_RESULT(set LIBC="$withval") 3305 AC_MSG_RESULT(set LIBC="$withval")
3304 else AC_MSG_ERROR([proper usage is --with-libc=STRING]) 3306 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
3305 fi], 3307 fi],
3306 [AC_MSG_RESULT(default LIBC="$LIBC")]) 3308 [AC_MSG_RESULT(default LIBC="$LIBC")])
3309
3310 # **************************************
3311 # * Check for gcc x64 inline assembler *
3312 # **************************************
3313
3314 AC_MSG_CHECKING(for x64 gcc inline assembler)
3315 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
3316 __asm__ __volatile__ ("movq %rcx, %rax");
3317 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
3318 AC_MSG_RESULT($have_gcc_asm_for_x64)
3319 if test "$have_gcc_asm_for_x64" = yes
3320 then
3321 AC_DEFINE(HAVE_GCC_ASM_FOR_X64, 1,
3322 [Define if we can use x64 gcc inline assembler])
3323 fi
3307 3324
3308 # ************************************************** 3325 # **************************************************
3309 # * Check for various properties of floating point * 3326 # * Check for various properties of floating point *
3310 # ************************************************** 3327 # **************************************************
3311 3328
3312 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64) 3329 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
3313 AC_CACHE_VAL(ac_cv_little_endian_double, [ 3330 AC_CACHE_VAL(ac_cv_little_endian_double, [
3314 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 3331 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3315 #include <string.h> 3332 #include <string.h>
3316 int main() { 3333 int main() {
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
4282 4299
4283 AC_SUBST(SRCDIRS) 4300 AC_SUBST(SRCDIRS)
4284 SRCDIRS="Parser Grammar Objects Python Modules Mac" 4301 SRCDIRS="Parser Grammar Objects Python Modules Mac"
4285 AC_MSG_CHECKING(for build directories) 4302 AC_MSG_CHECKING(for build directories)
4286 for dir in $SRCDIRS; do 4303 for dir in $SRCDIRS; do
4287 if test ! -d $dir; then 4304 if test ! -d $dir; then
4288 mkdir $dir 4305 mkdir $dir
4289 fi 4306 fi
4290 done 4307 done
4291 AC_MSG_RESULT(done) 4308 AC_MSG_RESULT(done)
4309
4310 # Availability of -O2:
4311 AC_MSG_CHECKING(for -O2)
4312 saved_cflags="$CFLAGS"
4313 CFLAGS="-O2"
4314 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
4315 ]])],[have_O2=yes],[have_O2=no])
4316 AC_MSG_RESULT($have_O2)
4317 CFLAGS="$saved_cflags"
4318
4319 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
4320 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
4321 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
4322 saved_cflags="$CFLAGS"
4323 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
4324 if test "$have_O2" = no; then
4325 CFLAGS=""
4326 fi
4327 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4328 #include <stdio.h>
4329 #include <stdlib.h>
4330 #include <string.h>
4331 void foo(void *p, void *q) { memmove(p, q, 19); }
4332 int main() {
4333 char a[32] = "123456789000000000";
4334 foo(&a[9], a);
4335 if (strcmp(a, "123456789123456789000000000") != 0)
4336 return 1;
4337 foo(a, &a[9]);
4338 if (strcmp(a, "123456789000000000") != 0)
4339 return 1;
4340 return 0;
4341 }
4342 ]])],
4343 [have_glibc_memmove_bug=no],
4344 [have_glibc_memmove_bug=yes],
4345 [have_glibc_memmove_bug=undefined])
4346 CFLAGS="$saved_cflags"
4347 AC_MSG_RESULT($have_glibc_memmove_bug)
4348 if test "$have_glibc_memmove_bug" = yes; then
4349 AC_DEFINE(HAVE_GLIBC_MEMMOVE_BUG, 1,
4350 [Define if glibc has incorrect _FORTIFY_SOURCE wrappers
4351 for memmove and bcopy.])
4352 fi
4353
4354 if test "$have_gcc_asm_for_x87" = yes; then
4355 # Some versions of gcc miscompile inline asm:
4356 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
4357 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
4358 case $CC in
4359 *gcc*)
4360 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
4361 saved_cflags="$CFLAGS"
4362 CFLAGS="-O2"
4363 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4364 __attribute__((noinline)) int
4365 foo(int *p) {
4366 int r;
4367 asm ( "movl \$6, (%1)\n\t"
4368 "xorl %0, %0\n\t"
4369 : "=r" (r) : "r" (p) : "memory"
4370 );
4371 return r;
4372 }
4373 int main() {
4374 int p = 8;
4375 if ((foo(&p) ? : p) != 6)
4376 return 1;
4377 return 0;
4378 }
4379 ]])],
4380 [have_ipa_pure_const_bug=no],
4381 [have_ipa_pure_const_bug=yes],
4382 [have_ipa_pure_const_bug=undefined])
4383 CFLAGS="$saved_cflags"
4384 AC_MSG_RESULT($have_ipa_pure_const_bug)
4385 if test "$have_ipa_pure_const_bug" = yes; then
4386 AC_DEFINE(HAVE_IPA_PURE_CONST_BUG, 1,
4387 [Define if gcc has the ipa-pure-const bug.])
4388 fi
4389 ;;
4390 esac
4391 fi
4292 4392
4293 # generate output files 4393 # generate output files
4294 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) 4394 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
4295 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) 4395 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
4296 AC_OUTPUT 4396 AC_OUTPUT
4297 4397
4298 echo "creating Modules/Setup" 4398 echo "creating Modules/Setup"
4299 if test ! -f Modules/Setup 4399 if test ! -f Modules/Setup
4300 then 4400 then
4301 cp $srcdir/Modules/Setup.dist Modules/Setup 4401 cp $srcdir/Modules/Setup.dist Modules/Setup
4302 fi 4402 fi
4303 4403
4304 echo "creating Modules/Setup.local" 4404 echo "creating Modules/Setup.local"
4305 if test ! -f Modules/Setup.local 4405 if test ! -f Modules/Setup.local
4306 then 4406 then
4307 echo "# Edit this file for local setup changes" >Modules/Setup.local 4407 echo "# Edit this file for local setup changes" >Modules/Setup.local
4308 fi 4408 fi
4309 4409
4310 echo "creating Makefile" 4410 echo "creating Makefile"
4311 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4411 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4312 -s Modules Modules/Setup.config \ 4412 -s Modules Modules/Setup.config \
4313 Modules/Setup.local Modules/Setup 4413 Modules/Setup.local Modules/Setup
4314 mv config.c Modules 4414 mv config.c Modules
OLDNEW
« no previous file with comments | « configure ('k') | Doc/library/decimal.rst » ('j') | no next file with comments »

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