+
+dnl check for JIT compiler
+AC_ARG_ENABLE([jit], [AS_HELP_STRING(--disable-jit,disable JIT compiler [[default=yes]])])
+
+AC_MSG_CHECKING(whether JIT compiled should be compiled)
+if test x"$enable_jit" = "xno"; then
+ AC_MSG_RESULT(no)
+ AM_CONDITIONAL([ENABLE_JIT], [false])
+else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_JIT], 1, [enable JIT compiler])
+ AM_CONDITIONAL([ENABLE_JIT], [true])
+fi
+
+dnl check for interpreter
+AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
+
+AC_MSG_CHECKING(whether interpreter should be compiled)
+if test x"$enable_intrp" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
+ AM_CONDITIONAL([ENABLE_INTRP], [true])
+ ENABLE_INTRP="yes"
+else
+ AC_MSG_RESULT(no)
+ AM_CONDITIONAL([ENABLE_INTRP], [false])
+ ENABLE_INTRP="no"
+fi
+
+if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
+ AC_ERROR(You have to enable at least the JIT or the interpreter.)
+fi
+if test x"${ENABLE_JIT}" = "xyes" -a x"${ENABLE_INTRP}" = "xyes"; then
+ AC_ERROR(This is currently not supported. Please disable the JIT or the interpreter.)
+fi
+
+dnl check for garbage collector usage
+AC_ARG_ENABLE([gc], [AS_HELP_STRING(--disable-gc,disable garbage collector (for debugging only!) [[default=yes]])])
+
+AC_MSG_CHECKING(whether GC should be used)
+if test x"$enable_gc" = "xno"; then
+ AC_MSG_RESULT(no)
+ AM_CONDITIONAL([DISABLE_GC], [true])
+ DISABLE_GC="yes"
+else
+ AC_MSG_RESULT(yes)
+ AM_CONDITIONAL([DISABLE_GC], [false])
+ DISABLE_GC="no"
+fi
+
+dnl check for dump memory usage
+AC_ARG_ENABLE([gc], [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])])
+
+AC_MSG_CHECKING(whether dump memory should be used)
+if test x"$enable_dump" = "xno"; then
+ AC_MSG_RESULT(no)
+ AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
+else
+ AC_MSG_RESULT(yes)
+fi
+
+dnl check for statistics
+AC_ARG_ENABLE([statistics], [AS_HELP_STRING(--disable-statistics,disable statistics generation [[default=yes]])])
+
+AC_MSG_CHECKING(whether statistics generation should be enabled)
+if test x"$enable_statistics" = "xno"; then
+ AC_MSG_RESULT(no)
+ AM_CONDITIONAL([STATISTICS], [false])
+else
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([STATISTICS], 1, [use statistics])
+ AM_CONDITIONAL([STATISTICS], [true])
+fi
+
+dnl check for JVMTI
+AC_ARG_ENABLE([jvmti], [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])])
+
+AC_MSG_CHECKING(whether to compile JVMTI support)
+if test x"$enable_jvmti" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
+ AM_CONDITIONAL([ENABLE_JVMTI], [true])
+else
+ AC_MSG_RESULT(no)
+ AM_CONDITIONAL([ENABLE_JVMTI], [false])
+fi