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

Delta Between Two Patch Sets: configure.ac

Issue 3754: cross-compilation support for python build
Left Patch Set: Created 1 year, 3 months ago
Right Patch Set: Created 1 year 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Makefile.pre.in ('k') | pyconfig.h.in » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 AC_TYPE_PID_T 1538 AC_TYPE_PID_T
1539 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) 1539 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void])
1540 AC_TYPE_SIZE_T 1540 AC_TYPE_SIZE_T
1541 AC_TYPE_UID_T 1541 AC_TYPE_UID_T
1542 AC_TYPE_UINT32_T 1542 AC_TYPE_UINT32_T
1543 AC_TYPE_UINT64_T 1543 AC_TYPE_UINT64_T
1544 AC_TYPE_INT32_T 1544 AC_TYPE_INT32_T
1545 AC_TYPE_INT64_T 1545 AC_TYPE_INT64_T
1546 AC_CHECK_TYPE(ssize_t, 1546 AC_CHECK_TYPE(ssize_t,
1547 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,) 1547 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,)
1548 AC_CHECK_TYPE(__uint128_t,
1549 AC_DEFINE(HAVE_GCC_UINT128_T, 1, [Define if your compiler provides __uint128_t ]),,)
1548 1550
1549 # Sizes of various common basic types 1551 # Sizes of various common basic types
1550 # ANSI C requires sizeof(char) == 1, so no need to check it 1552 # ANSI C requires sizeof(char) == 1, so no need to check it
1551 AC_CHECK_SIZEOF(int, 4) 1553 AC_CHECK_SIZEOF(int, 4)
1552 AC_CHECK_SIZEOF(long, 4) 1554 AC_CHECK_SIZEOF(long, 4)
1553 AC_CHECK_SIZEOF(void *, 4) 1555 AC_CHECK_SIZEOF(void *, 4)
1554 AC_CHECK_SIZEOF(short, 2) 1556 AC_CHECK_SIZEOF(short, 2)
1555 AC_CHECK_SIZEOF(float, 4) 1557 AC_CHECK_SIZEOF(float, 4)
1556 AC_CHECK_SIZEOF(double, 8) 1558 AC_CHECK_SIZEOF(double, 8)
1557 AC_CHECK_SIZEOF(fpos_t, 4) 1559 AC_CHECK_SIZEOF(fpos_t, 4)
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 [with_system_ffi="no"]) 2103 [with_system_ffi="no"])
2102 2104
2103 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then 2105 if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
2104 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed - e 's/^-I//;s/ *$//'`" 2106 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed - e 's/^-I//;s/ *$//'`"
2105 else 2107 else
2106 LIBFFI_INCLUDEDIR="" 2108 LIBFFI_INCLUDEDIR=""
2107 fi 2109 fi
2108 AC_SUBST(LIBFFI_INCLUDEDIR) 2110 AC_SUBST(LIBFFI_INCLUDEDIR)
2109 2111
2110 AC_MSG_RESULT($with_system_ffi) 2112 AC_MSG_RESULT($with_system_ffi)
2113
2114 # Check for use of the system libmpdec library
2115 AC_MSG_CHECKING(for --with-system-libmpdec)
2116 AC_ARG_WITH(system_libmpdec,
2117 AS_HELP_STRING([--with-system-libmpdec], [build _decimal module usin g an installed libmpdec library]),
2118 [],
2119 [with_system_libmpdec="no"])
2120
2121 AC_MSG_RESULT($with_system_libmpdec)
2111 2122
2112 # Check for support for loadable sqlite extensions 2123 # Check for support for loadable sqlite extensions
2113 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions) 2124 AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions)
2114 AC_ARG_ENABLE(loadable-sqlite-extensions, 2125 AC_ARG_ENABLE(loadable-sqlite-extensions,
2115 AS_HELP_STRING([--enable-loadable-sqlite-extensions], [support loa dable extensions in _sqlite module]), 2126 AS_HELP_STRING([--enable-loadable-sqlite-extensions], [support loa dable extensions in _sqlite module]),
2116 [], 2127 [],
2117 [enable_loadable_sqlite_extensions="no"]) 2128 [enable_loadable_sqlite_extensions="no"])
2118 2129
2119 AC_MSG_RESULT($enable_loadable_sqlite_extensions) 2130 AC_MSG_RESULT($enable_loadable_sqlite_extensions)
2120 2131
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
3389 if test "$withval" = no 3400 if test "$withval" = no
3390 then LIBC= 3401 then LIBC=
3391 AC_MSG_RESULT(force LIBC empty) 3402 AC_MSG_RESULT(force LIBC empty)
3392 elif test "$withval" != yes 3403 elif test "$withval" != yes
3393 then LIBC=$withval 3404 then LIBC=$withval
3394 AC_MSG_RESULT(set LIBC="$withval") 3405 AC_MSG_RESULT(set LIBC="$withval")
3395 else AC_MSG_ERROR([proper usage is --with-libc=STRING]) 3406 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
3396 fi], 3407 fi],
3397 [AC_MSG_RESULT(default LIBC="$LIBC")]) 3408 [AC_MSG_RESULT(default LIBC="$LIBC")])
3398 3409
3410 # **************************************
3411 # * Check for gcc x64 inline assembler *
3412 # **************************************
3413
3414 AC_MSG_CHECKING(for x64 gcc inline assembler)
3415 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
3416 __asm__ __volatile__ ("movq %rcx, %rax");
3417 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
3418 AC_MSG_RESULT($have_gcc_asm_for_x64)
3419 if test "$have_gcc_asm_for_x64" = yes
3420 then
3421 AC_DEFINE(HAVE_GCC_ASM_FOR_X64, 1,
3422 [Define if we can use x64 gcc inline assembler])
3423 fi
3424
3399 # ************************************************** 3425 # **************************************************
3400 # * Check for various properties of floating point * 3426 # * Check for various properties of floating point *
3401 # ************************************************** 3427 # **************************************************
3402 3428
3403 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64) 3429 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
3404 AC_CACHE_VAL(ac_cv_little_endian_double, [ 3430 AC_CACHE_VAL(ac_cv_little_endian_double, [
3405 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 3431 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3406 #include <string.h> 3432 #include <string.h>
3407 int main() { 3433 int main() {
3408 double x = 9006104071832581.0; 3434 double x = 9006104071832581.0;
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
4439 AC_SUBST(SRCDIRS) 4465 AC_SUBST(SRCDIRS)
4440 SRCDIRS="Parser Grammar Objects Python Modules Mac" 4466 SRCDIRS="Parser Grammar Objects Python Modules Mac"
4441 AC_MSG_CHECKING(for build directories) 4467 AC_MSG_CHECKING(for build directories)
4442 for dir in $SRCDIRS; do 4468 for dir in $SRCDIRS; do
4443 if test ! -d $dir; then 4469 if test ! -d $dir; then
4444 mkdir $dir 4470 mkdir $dir
4445 fi 4471 fi
4446 done 4472 done
4447 AC_MSG_RESULT(done) 4473 AC_MSG_RESULT(done)
4448 4474
4475 # Availability of -O2:
4476 AC_MSG_CHECKING(for -O2)
4477 saved_cflags="$CFLAGS"
4478 CFLAGS="-O2"
4479 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
4480 ]])],[have_O2=yes],[have_O2=no])
4481 AC_MSG_RESULT($have_O2)
4482 CFLAGS="$saved_cflags"
4483
4484 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
4485 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
4486 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
4487 saved_cflags="$CFLAGS"
4488 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
4489 if test "$have_O2" = no; then
4490 CFLAGS=""
4491 fi
4492 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4493 #include <stdio.h>
4494 #include <stdlib.h>
4495 #include <string.h>
4496 void foo(void *p, void *q) { memmove(p, q, 19); }
4497 int main() {
4498 char a[32] = "123456789000000000";
4499 foo(&a[9], a);
4500 if (strcmp(a, "123456789123456789000000000") != 0)
4501 return 1;
4502 foo(a, &a[9]);
4503 if (strcmp(a, "123456789000000000") != 0)
4504 return 1;
4505 return 0;
4506 }
4507 ]])],
4508 [have_glibc_memmove_bug=no],
4509 [have_glibc_memmove_bug=yes],
4510 [have_glibc_memmove_bug=undefined])
4511 CFLAGS="$saved_cflags"
4512 AC_MSG_RESULT($have_glibc_memmove_bug)
4513 if test "$have_glibc_memmove_bug" = yes; then
4514 AC_DEFINE(HAVE_GLIBC_MEMMOVE_BUG, 1,
4515 [Define if glibc has incorrect _FORTIFY_SOURCE wrappers
4516 for memmove and bcopy.])
4517 fi
4518
4519 if test "$have_gcc_asm_for_x87" = yes; then
4520 # Some versions of gcc miscompile inline asm:
4521 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
4522 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
4523 case $CC in
4524 *gcc*)
4525 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
4526 saved_cflags="$CFLAGS"
4527 CFLAGS="-O2"
4528 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4529 __attribute__((noinline)) int
4530 foo(int *p) {
4531 int r;
4532 asm ( "movl \$6, (%1)\n\t"
4533 "xorl %0, %0\n\t"
4534 : "=r" (r) : "r" (p) : "memory"
4535 );
4536 return r;
4537 }
4538 int main() {
4539 int p = 8;
4540 if ((foo(&p) ? : p) != 6)
4541 return 1;
4542 return 0;
4543 }
4544 ]])],
4545 [have_ipa_pure_const_bug=no],
4546 [have_ipa_pure_const_bug=yes],
4547 [have_ipa_pure_const_bug=undefined])
4548 CFLAGS="$saved_cflags"
4549 AC_MSG_RESULT($have_ipa_pure_const_bug)
4550 if test "$have_ipa_pure_const_bug" = yes; then
4551 AC_DEFINE(HAVE_IPA_PURE_CONST_BUG, 1,
4552 [Define if gcc has the ipa-pure-const bug.])
4553 fi
4554 ;;
4555 esac
4556 fi
4557
4449 # generate output files 4558 # generate output files
4450 AC_CONFIG_COMMANDS_PRE([ 4559 AC_CONFIG_COMMANDS_PRE([
4451 AC_MSG_NOTICE([creating Modules/Setup]) 4560 AC_MSG_NOTICE([creating Modules/Setup])
4452 if test ! -f Modules/Setup 4561 if test ! -f Modules/Setup
4453 then 4562 then
4454 cp $srcdir/Modules/Setup.dist Modules/Setup 4563 cp $srcdir/Modules/Setup.dist Modules/Setup
4455 fi 4564 fi
4456 4565
4457 AC_MSG_NOTICE([creating Modules/Setup.local]) 4566 AC_MSG_NOTICE([creating Modules/Setup.local])
4458 if test ! -f Modules/Setup.local 4567 if test ! -f Modules/Setup.local
4459 then 4568 then
4460 echo "# Edit this file for local setup changes" >Modules/Setup.local 4569 echo "# Edit this file for local setup changes" >Modules/Setup.local
4461 fi 4570 fi
4462 ]) 4571 ])
4463 4572
4464 AC_CONFIG_COMMANDS([Makefile],[ 4573 AC_CONFIG_COMMANDS([Makefile],[
4465 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4574 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4466 -s Modules Modules/Setup.config \ 4575 -s Modules Modules/Setup.config \
4467 Modules/Setup.local Modules/Setup 4576 Modules/Setup.local Modules/Setup
4468 mv config.c Modules]) 4577 mv config.c Modules])
4469 4578
4470 AC_CONFIG_FILES([setup_info]) 4579 AC_CONFIG_FILES([setup_info])
4471 AC_CONFIG_FILES([Makefile.pre Modules/Setup.config Misc/python.pc]) 4580 AC_CONFIG_FILES([Makefile.pre Modules/Setup.config Misc/python.pc])
4472 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) 4581 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
4473 AC_OUTPUT 4582 AC_OUTPUT
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7