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

Side by Side Diff: configure.in

Issue 7652: Merge C version of decimal into py3k.
Patch Set: Created 7 years, 10 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 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 AC_TYPE_PID_T 1448 AC_TYPE_PID_T
1449 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void]) 1449 AC_DEFINE_UNQUOTED([RETSIGTYPE],[void],[assume C89 semantics that RETSIGTYPE is always void])
1450 AC_TYPE_SIZE_T 1450 AC_TYPE_SIZE_T
1451 AC_TYPE_UID_T 1451 AC_TYPE_UID_T
1452 AC_TYPE_UINT32_T 1452 AC_TYPE_UINT32_T
1453 AC_TYPE_UINT64_T 1453 AC_TYPE_UINT64_T
1454 AC_TYPE_INT32_T 1454 AC_TYPE_INT32_T
1455 AC_TYPE_INT64_T 1455 AC_TYPE_INT64_T
1456 AC_CHECK_TYPE(ssize_t, 1456 AC_CHECK_TYPE(ssize_t,
1457 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,) 1457 AC_DEFINE(HAVE_SSIZE_T, 1, [Define if your compiler provides ssize_t]),,)
1458 AC_CHECK_TYPE(__uint128_t,
1459 AC_DEFINE(HAVE_GCC_UINT128_T, 1, [Define if your compiler provides __uint128_t ]),,)
1458 1460
1459 # Sizes of various common basic types 1461 # Sizes of various common basic types
1460 # ANSI C requires sizeof(char) == 1, so no need to check it 1462 # ANSI C requires sizeof(char) == 1, so no need to check it
1461 AC_CHECK_SIZEOF(int, 4) 1463 AC_CHECK_SIZEOF(int, 4)
1462 AC_CHECK_SIZEOF(long, 4) 1464 AC_CHECK_SIZEOF(long, 4)
1463 AC_CHECK_SIZEOF(void *, 4) 1465 AC_CHECK_SIZEOF(void *, 4)
1464 AC_CHECK_SIZEOF(short, 2) 1466 AC_CHECK_SIZEOF(short, 2)
1465 AC_CHECK_SIZEOF(float, 4) 1467 AC_CHECK_SIZEOF(float, 4)
1466 AC_CHECK_SIZEOF(double, 8) 1468 AC_CHECK_SIZEOF(double, 8)
1467 AC_CHECK_SIZEOF(fpos_t, 4) 1469 AC_CHECK_SIZEOF(fpos_t, 4)
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
3261 [ 3263 [
3262 if test "$withval" = no 3264 if test "$withval" = no
3263 then LIBC= 3265 then LIBC=
3264 AC_MSG_RESULT(force LIBC empty) 3266 AC_MSG_RESULT(force LIBC empty)
3265 elif test "$withval" != yes 3267 elif test "$withval" != yes
3266 then LIBC=$withval 3268 then LIBC=$withval
3267 AC_MSG_RESULT(set LIBC="$withval") 3269 AC_MSG_RESULT(set LIBC="$withval")
3268 else AC_MSG_ERROR([proper usage is --with-libc=STRING]) 3270 else AC_MSG_ERROR([proper usage is --with-libc=STRING])
3269 fi], 3271 fi],
3270 [AC_MSG_RESULT(default LIBC="$LIBC")]) 3272 [AC_MSG_RESULT(default LIBC="$LIBC")])
3273
3274 # **************************************
3275 # * Check for gcc x64 inline assembler *
3276 # **************************************
3277
3278 AC_MSG_CHECKING(for x64 gcc inline assembler)
3279 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
3280 __asm__ __volatile__ ("movq %rcx, %rax");
3281 ]])],[have_gcc_asm_for_x64=yes],[have_gcc_asm_for_x64=no])
3282 AC_MSG_RESULT($have_gcc_asm_for_x64)
3283 if test "$have_gcc_asm_for_x64" = yes
3284 then
3285 AC_DEFINE(HAVE_GCC_ASM_FOR_X64, 1,
3286 [Define if we can use x64 gcc inline assembler])
3287 fi
3271 3288
3272 # ************************************************** 3289 # **************************************************
3273 # * Check for various properties of floating point * 3290 # * Check for various properties of floating point *
3274 # ************************************************** 3291 # **************************************************
3275 3292
3276 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64) 3293 AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
3277 AC_CACHE_VAL(ac_cv_little_endian_double, [ 3294 AC_CACHE_VAL(ac_cv_little_endian_double, [
3278 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 3295 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3279 #include <string.h> 3296 #include <string.h>
3280 int main() { 3297 int main() {
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 4263
4247 AC_SUBST(SRCDIRS) 4264 AC_SUBST(SRCDIRS)
4248 SRCDIRS="Parser Grammar Objects Python Modules Mac" 4265 SRCDIRS="Parser Grammar Objects Python Modules Mac"
4249 AC_MSG_CHECKING(for build directories) 4266 AC_MSG_CHECKING(for build directories)
4250 for dir in $SRCDIRS; do 4267 for dir in $SRCDIRS; do
4251 if test ! -d $dir; then 4268 if test ! -d $dir; then
4252 mkdir $dir 4269 mkdir $dir
4253 fi 4270 fi
4254 done 4271 done
4255 AC_MSG_RESULT(done) 4272 AC_MSG_RESULT(done)
4273
4274 # Availability of -O2:
4275 AC_MSG_CHECKING(for -O2)
4276 saved_cflags="$CFLAGS"
4277 CFLAGS="-O2"
4278 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
4279 ]])],[have_O2=yes],[have_O2=no])
4280 AC_MSG_RESULT($have_O2)
4281 CFLAGS="$saved_cflags"
4282
4283 # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
4284 # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
4285 AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug)
4286 saved_cflags="$CFLAGS"
4287 CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
4288 if test "$have_O2" = no; then
4289 CFLAGS=""
4290 fi
4291 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4292 #include <stdio.h>
4293 #include <stdlib.h>
4294 #include <string.h>
4295 void foo(void *p, void *q) { memmove(p, q, 19); }
4296 int main() {
4297 char a[32] = "123456789000000000";
4298 foo(&a[9], a);
4299 if (strcmp(a, "123456789123456789000000000") != 0)
4300 return 1;
4301 foo(a, &a[9]);
4302 if (strcmp(a, "123456789000000000") != 0)
4303 return 1;
4304 return 0;
4305 }
4306 ]])],
4307 [have_glibc_memmove_bug=no],
4308 [have_glibc_memmove_bug=yes],
4309 [have_glibc_memmove_bug=undefined])
4310 CFLAGS="$saved_cflags"
4311 AC_MSG_RESULT($have_glibc_memmove_bug)
4312 if test "$have_glibc_memmove_bug" = yes; then
4313 AC_DEFINE(HAVE_GLIBC_MEMMOVE_BUG, 1,
4314 [Define if glibc has incorrect _FORTIFY_SOURCE wrappers
4315 for memmove and bcopy.])
4316 fi
4317
4318 if test "$have_gcc_asm_for_x87" = yes; then
4319 # Some versions of gcc miscompile inline asm:
4320 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
4321 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
4322 case $CC in
4323 *gcc*)
4324 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
4325 saved_cflags="$CFLAGS"
4326 CFLAGS="-O2"
4327 AC_RUN_IFELSE([AC_LANG_SOURCE([[
4328 __attribute__((noinline)) int
4329 foo(int *p) {
4330 int r;
4331 asm ( "movl \$6, (%1)\n\t"
4332 "xorl %0, %0\n\t"
4333 : "=r" (r) : "r" (p) : "memory"
4334 );
4335 return r;
4336 }
4337 int main() {
4338 int p = 8;
4339 if ((foo(&p) ? : p) != 6)
4340 return 1;
4341 return 0;
4342 }
4343 ]])],
4344 [have_ipa_pure_const_bug=no],
4345 [have_ipa_pure_const_bug=yes],
4346 [have_ipa_pure_const_bug=undefined])
4347 CFLAGS="$saved_cflags"
4348 AC_MSG_RESULT($have_ipa_pure_const_bug)
4349 if test "$have_ipa_pure_const_bug" = yes; then
4350 AC_DEFINE(HAVE_IPA_PURE_CONST_BUG, 1,
4351 [Define if gcc has the ipa-pure-const bug.])
4352 fi
4353 ;;
4354 esac
4355 fi
4256 4356
4257 # generate output files 4357 # generate output files
4258 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) 4358 AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
4259 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) 4359 AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
4260 AC_OUTPUT 4360 AC_OUTPUT
4261 4361
4262 echo "creating Modules/Setup" 4362 echo "creating Modules/Setup"
4263 if test ! -f Modules/Setup 4363 if test ! -f Modules/Setup
4264 then 4364 then
4265 cp $srcdir/Modules/Setup.dist Modules/Setup 4365 cp $srcdir/Modules/Setup.dist Modules/Setup
4266 fi 4366 fi
4267 4367
4268 echo "creating Modules/Setup.local" 4368 echo "creating Modules/Setup.local"
4269 if test ! -f Modules/Setup.local 4369 if test ! -f Modules/Setup.local
4270 then 4370 then
4271 echo "# Edit this file for local setup changes" >Modules/Setup.local 4371 echo "# Edit this file for local setup changes" >Modules/Setup.local
4272 fi 4372 fi
4273 4373
4274 echo "creating Makefile" 4374 echo "creating Makefile"
4275 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4375 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4276 -s Modules Modules/Setup.config \ 4376 -s Modules Modules/Setup.config \
4277 Modules/Setup.local Modules/Setup 4377 Modules/Setup.local Modules/Setup
4278 mv config.c Modules 4378 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+