-fno-crossjumping).
*/
-#if defined(USE_COMPUTED_GOTOS) && defined(DYNAMIC_EXECUTION_PROFILE)
+#ifdef DYNAMIC_EXECUTION_PROFILE
#undef USE_COMPUTED_GOTOS
+#define USE_COMPUTED_GOTOS 0
+#endif
+
+#ifdef HAVE_COMPUTED_GOTOS
+ #ifndef USE_COMPUTED_GOTOS
+ #define USE_COMPUTED_GOTOS 1
+ #endif
+#else
+ #if defined(USE_COMPUTED_GOTOS) && USE_COMPUTED_GOTOS
+ #error "Computed gotos are not supported on this compiler."
+ #endif
+ #undef USE_COMPUTED_GOTOS
+ #define USE_COMPUTED_GOTOS 0
#endif
-#ifdef USE_COMPUTED_GOTOS
+#if USE_COMPUTED_GOTOS
/* Import the static jump table */
#include "opcode_targets.h"
*/
-#if defined(DYNAMIC_EXECUTION_PROFILE) || defined(USE_COMPUTED_GOTOS)
+#if defined(DYNAMIC_EXECUTION_PROFILE) || USE_COMPUTED_GOTOS
#define PREDICT(op) if (0) goto PRED_##op
#define PREDICTED(op) PRED_##op:
#define PREDICTED_WITH_ARG(op) PRED_##op:
oparg = oparg<<16 | NEXTARG();
goto dispatch_opcode;
-#ifdef USE_COMPUTED_GOTOS
+#if USE_COMPUTED_GOTOS
_unknown_opcode:
#endif
default:
#! /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.
#
--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
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
;
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
{ $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; }
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; }
# 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
+
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
wide chars that would be converted.])
fi
+AC_MSG_CHECKING(whether $CC supports computed gotos)
+AC_CACHE_VAL(ac_cv_computed_gotos,
+AC_RUN_IFELSE([AC_LANG_SOURCE([[[
+int main(int argc, char **argv)
+{
+ static void *targets[1] = { &&LABEL1 };
+ goto LABEL2;
+LABEL1:
+ return 0;
+LABEL2:
+ goto *targets[0];
+ return 1;
+}
+]]])],
+[ac_cv_computed_gotos=yes],
+[ac_cv_computed_gotos=no],
+[ac_cv_computed_gotos=no]))
+AC_MSG_RESULT($ac_cv_computed_gotos)
+if test "$ac_cv_computed_gotos" = yes
+then
+ AC_DEFINE(HAVE_COMPUTED_GOTOS, 1,
+ [Define if the C compiler supports computed gotos.])
+fi
+
# Check for --with-computed-gotos
AC_MSG_CHECKING(for --with-computed-gotos)
AC_ARG_WITH(computed-gotos,
- AS_HELP_STRING([--with-computed-gotos],
- [Use computed gotos / threaded dispatch in evaluation loop (not available on all compilers)]),
+ AS_HELP_STRING([--with(out)-computed-gotos],
+ [Use computed gotos in evaluation loop (enabled by default on supported compilers)]),
[
-if test "$withval" != no
+if test "$withval" = yes
then
AC_DEFINE(USE_COMPUTED_GOTOS, 1,
[Define if you want to use computed gotos in ceval.c.])
AC_MSG_RESULT(yes)
-else AC_MSG_RESULT(no)
-fi],
-[AC_MSG_RESULT(no)])
+fi
+if test "$withval" = no
+then
+ AC_DEFINE(USE_COMPUTED_GOTOS, 0,
+ [Define if you want to use computed gotos in ceval.c.])
+ AC_MSG_RESULT(no)
+fi
+],
+[AC_MSG_RESULT(no value specified)])