diff --git a/src/configure b/src/configure index 153990bb3a..909372ffcc 100755 --- a/src/configure +++ b/src/configure @@ -1344,6 +1344,7 @@ Optional Features: --enable-dynlib same as --enable-shared --enable-lt= use instead of bundled libtool --enable-origtree install with original directory structure + --enable-jit compile JIT support (enabled by default) --enable-foreign compile foreign support (enabled by default) --enable-places compile places support --enable-cgcdefault use CGC (Boehm or Senora) as default build @@ -1879,6 +1880,14 @@ if test "${enable_origtree+set}" = set; then fi +# Check whether --enable-jit was given. +if test "${enable_jit+set}" = set; then + enableval=$enable_jit; +else + enable_jit=yes +fi + + # Check whether --enable-foreign was given. if test "${enable_foreign+set}" = set; then enableval=$enable_foreign; @@ -2235,6 +2244,8 @@ if test "$LIBTOOLPROG" != "" ; then fi show_explicitly_enabled "${enable_orig}" "Original install tree" +show_explicitly_disabled "${enable_jit}" JIT + show_explicitly_disabled "${enable_foreign}" Foreign show_explicitly_enabled "${enable_sgc}" SGC @@ -10365,6 +10376,12 @@ if test "${enable_noopt}" = "yes" ; then CXXFLAGS=`echo "$CXXFLAGS" | awk "$AWKPRG"` fi +################### JIT #################### + +if test "${enable_jit}" = "no" ; then + PREFLAGS="${PREFLAGS} -DMZ_DONT_USE_JIT" +fi + ################ X OpenGL ################## if test "${enable_gl}" = "" ; then diff --git a/src/mzscheme/configure.ac b/src/mzscheme/configure.ac index 6bc47e8a47..326e583588 100644 --- a/src/mzscheme/configure.ac +++ b/src/mzscheme/configure.ac @@ -39,6 +39,8 @@ AC_ARG_ENABLE(lt, [ --enable-lt= use instead of bundled AC_ARG_ENABLE(origtree,[ --enable-origtree install with original directory structure]) +AC_ARG_ENABLE(jit, [ --enable-jit compile JIT support (enabled by default)], , enable_jit=yes) + AC_ARG_ENABLE(foreign, [ --enable-foreign compile foreign support (enabled by default)], , enable_foreign=yes) AC_ARG_ENABLE(places, [ --enable-places compile places support]) @@ -287,6 +289,8 @@ if test "$LIBTOOLPROG" != "" ; then fi show_explicitly_enabled "${enable_orig}" "Original install tree" +show_explicitly_disabled "${enable_jit}" JIT + show_explicitly_disabled "${enable_foreign}" Foreign show_explicitly_enabled "${enable_sgc}" SGC @@ -1072,6 +1076,12 @@ if test "${enable_noopt}" = "yes" ; then CXXFLAGS=`echo "$CXXFLAGS" | awk "$AWKPRG"` fi +################### JIT #################### + +if test "${enable_jit}" = "no" ; then + PREFLAGS="${PREFLAGS} -DMZ_DONT_USE_JIT" +fi + ################ X OpenGL ################## if test "${enable_gl}" = "" ; then diff --git a/src/mzscheme/include/scheme.h b/src/mzscheme/include/scheme.h index e2a71aa7e0..4e5c881b68 100644 --- a/src/mzscheme/include/scheme.h +++ b/src/mzscheme/include/scheme.h @@ -176,8 +176,10 @@ typedef struct FSSpec mzFSSpec; # define THREAD_LOCAL /* empty */ #endif -#if defined(MZ_USE_JIT_PPC) || defined(MZ_USE_JIT_I386) || defined(MZ_USE_JIT_X86_64) -# define MZ_USE_JIT +#ifndef MZ_DONT_USE_JIT +# if defined(MZ_USE_JIT_PPC) || defined(MZ_USE_JIT_I386) || defined(MZ_USE_JIT_X86_64) +# define MZ_USE_JIT +# endif #endif /* Define _W64 for MSC if needed. */ diff --git a/src/mzscheme/src/schpriv.h b/src/mzscheme/src/schpriv.h index 1857e14d86..66ebd89acf 100644 --- a/src/mzscheme/src/schpriv.h +++ b/src/mzscheme/src/schpriv.h @@ -3219,8 +3219,13 @@ unsigned short * scheme_ucs4_to_utf16(const mzchar *text, int start, int end, Scheme_Object *scheme_current_library_collection_paths(int argc, Scheme_Object *argv[]); +#ifdef MZ_USE_JIT int scheme_can_inline_fp_op(); int scheme_can_inline_fp_comp(); +#else +# define scheme_can_inline_fp_op() 0 +# define scheme_can_inline_fp_comp() 0 +#endif /*========================================================================*/ /* places */