diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-08-13 21:15:58 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-08-13 21:15:58 (GMT) |
commit | 042b128f58a952b2cd04bd5b7401bd54c67a687e (patch) | |
tree | c4ac0fda68d9062064f3d28fa8baa80668515c26 /configure | |
parent | d835cf1c84f2b29d54f583139e03b95b906b6081 (diff) | |
download | cpython-042b128f58a952b2cd04bd5b7401bd54c67a687e.zip cpython-042b128f58a952b2cd04bd5b7401bd54c67a687e.tar.gz cpython-042b128f58a952b2cd04bd5b7401bd54c67a687e.tar.bz2 |
Issue #9203: Computed gotos are now enabled by default on supported
compilers (which are detected by the configure script). They can still
be disable selectively by specifying --without-computed-gotos.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 79 |
1 files changed, 65 insertions, 14 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 82090 . +# From configure.in Revision: 83580 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for python 3.2. # @@ -1421,8 +1421,9 @@ Optional Packages: --with-libm=STRING math library --with-libc=STRING C library --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes) - --with-computed-gotos Use computed gotos / threaded dispatch in evaluation - loop (not available on all compilers) + --with(out)-computed-gotos + Use computed gotos in evaluation loop (enabled by + default on supported compilers) Some influential environment variables: CC C compiler command @@ -1929,11 +1930,11 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default - enum { N = $2 / 2 - 1 }; int main () { -static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; +static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 }; + 0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0 ; @@ -1944,11 +1945,11 @@ if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default - enum { N = $2 / 2 - 1 }; int main () { -static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) +static int test_array [1 - 2 * !(enum { N = $2 / 2 - 1 }; + ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0 @@ -9121,7 +9122,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 $as_echo "$with_doc_strings" >&6; } -# Check for Python-specific malloc support +# Check if eval loop should use timestamp counter profiling { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5 $as_echo_n "checking for --with-tsc... " >&6; } @@ -13502,6 +13503,49 @@ $as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5 +$as_echo_n "checking whether $CC supports computed gotos... " >&6; } +if test "${ac_cv_computed_gotos+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_computed_gotos=no +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int main(int argc, char **argv) +{ + static void *targets[1] = { &&LABEL1 }; + goto LABEL2; +LABEL1: + return 0; +LABEL2: + goto *targets[0]; + return 1; +} + +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_computed_gotos=yes +else + ac_cv_computed_gotos=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5 +$as_echo "$ac_cv_computed_gotos" >&6; } +if test "$ac_cv_computed_gotos" = yes +then + +$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h + +fi + # Check for --with-computed-gotos { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5 $as_echo_n "checking for --with-computed-gotos... " >&6; } @@ -13509,21 +13553,28 @@ $as_echo_n "checking for --with-computed-gotos... " >&6; } # Check whether --with-computed-gotos was given. if test "${with_computed_gotos+set}" = set; then : withval=$with_computed_gotos; -if test "$withval" != no +if test "$withval" = yes then $as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } -else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } fi -else +if test "$withval" = no +then + +$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 +$as_echo "no value specified" >&6; } +fi + @@ -14086,8 +14137,8 @@ esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" +config_files="`echo $ac_config_files`" +config_headers="`echo $ac_config_headers`" _ACEOF |