gc_headers=no
gc=included
+gc_msg="included Boehm"
use_included_gc=no
libgc_configure_args=
AC_MSG_RESULT(ok)
fi
-AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Defaults to included],[gc=$with_gc],[gc=$gc_default])
+AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
# Enable support for fast thread-local storage
# Some systems have broken support, so we allow to disable it.
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
+dnl
+dnl Boehm GC configuration
+dnl
LIBGC_CFLAGS=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
AC_CHECK_LIB(gc, GC_gcj_malloc, found_gcj_malloc="yes",,$libdl)
if test "x$found_gcj_malloc" = "xyes"; then
BOEHM_DEFINES="-DHAVE_GC_GCJ_MALLOC $BOEHM_DEFINES"
- AC_DEFINE_UNQUOTED(USED_GC_NAME, "System Boehm (with typed GC)", [GC description])
+ AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (with typed GC)", [GC description])
+ gc_msg="System Boehm with typed GC"
else
- AC_DEFINE_UNQUOTED(USED_GC_NAME, "System Boehm (no typed GC)", [GC description])
+ AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "System Boehm (no typed GC)", [GC description])
+ gc_msg="System Boehm (without typed GC)"
fi
AC_CHECK_LIB(gc, GC_enable, found_gc_enable="yes",,$libdl)
if test "x$found_gc_enable" = "xyes"; then
;;
xincluded)
- found_boehm=yes
- gc_headers=yes
use_included_gc=yes
libgc_dir=libgc
BOEHM_DEFINES="-DHAVE_BOEHM_GC -DHAVE_GC_H -DUSE_INCLUDED_LIBGC -DHAVE_GC_GCJ_MALLOC -DHAVE_GC_ENABLE"
+ gc_msg="bundled Boehm GC with typed GC"
if test x$enable_parallel_mark = xyes; then
- AC_DEFINE_UNQUOTED(USED_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
+ AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
+ gc_msg="$gc_msg and parallel mark"
else
- AC_DEFINE_UNQUOTED(USED_GC_NAME, "Included Boehm (with typed GC)", [GC description])
+ AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC)", [GC description])
fi
;;
xsgen)
- found_boehm=no
- gc_headers=no
- use_included_gc=no
- AC_DEFINE(HAVE_SGEN_GC,1,[Using the simple generational GC.])
- AC_DEFINE(HAVE_MOVING_COLLECTOR,1,[The GC can move objects.])
- AC_DEFINE(HAVE_WRITE_BARRIERS,1,[The GC needs write barriers.])
- AC_DEFINE_UNQUOTED(USED_GC_NAME, "Simple generational", [GC description])
+ AC_MSG_WARN("Use --with-sgen instead, --with-gc= controls Boehm configuration")
;;
xnone)
AC_MSG_WARN("Compiling mono without GC.")
- AC_DEFINE_UNQUOTED(USED_GC_NAME, "none", [GC description])
+ AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "none", [GC description])
AC_DEFINE(HAVE_NULL_GC,1,[No GC support.])
;;
*)
AC_ARG_WITH(large-heap, [ --with-large-heap=yes,no Enable support for GC heaps larger than 3GB (defaults to no)], [large_heap=$withval], [large_heap=no])
if test "x$large_heap" = "xyes"; then
- echo "FOO"
CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
fi
dnl **************
AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the experimental LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
+AC_ARG_ENABLE(loadedllvm,[ --enable-loadedllvm Load the LLVM back-end dynamically], enable_llvm=$enableval && enable_loadedllvm=$enableval, enable_loadedllvm=no)
if test "x$enable_llvm" = "xyes"; then
AC_PATH_PROG(LLVM_CONFIG, llvm-config, no)
AC_DEFINE_UNQUOTED(LLVM_MAJOR_VERSION, $major_version, [Major version of LLVM libraries])
AC_DEFINE_UNQUOTED(LLVM_MINOR_VERSION, $minor_version, [Minor version of LLVM libraries])
+ AC_DEFINE_UNQUOTED(LLVM_VERSION, "$llvm_version", [Full version of LLVM libraties])
# Have to pass these on the command line since mini-llvm-cpp.h already includes
# llvm's config.h
fi
AM_CONDITIONAL(ENABLE_LLVM, [test x$enable_llvm = xyes])
+if test "x$enable_loadedllvm" = "xyes"; then
+ AC_DEFINE(MONO_LLVM_LOADED, 1, [The LLVM back end is dynamically loaded])
+fi
+AM_CONDITIONAL(LOADED_LLVM, [test x$enable_loadedllvm = xyes])
TARGET="unknown"
ACCESS_UNALIGNED="yes"
jit_wanted=false
interp_wanted=false
+sgen_supported=false
case "$host" in
# mips-sgi-irix5.* | mips-sgi-irix6.*)
# TARGET=MIPS;
haiku*)
LIBC=libroot.so
;;
+ linux*|darwin*)
+ sgen_supported=true
+ ;;
esac
;;
x86_64-*-* | amd64-*-*)
arch_target=amd64;
JIT_SUPPORTED=yes
jit_wanted=true
+ case $host_os in
+ linux*|darwin*)
+ sgen_supported=true
+ ;;
+ esac
;;
ia64-*-*)
TARGET=IA64
arch_target=ppc;
JIT_SUPPORTED=yes
jit_wanted=true
+ case $host_os in
+ linux*|darwin*)
+ sgen_supported=true
+ ;;
+ esac
;;
arm*-darwin*)
TARGET=ARM;
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -DARM_FPU_NONE=1"
jit_wanted=true
+ sgen_supported=true
;;
arm*-linux*)
TARGET=ARM;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
jit_wanted=true
+ sgen_supported=true
;;
s390-*-linux*)
TARGET=S390;
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=yes
jit_wanted=true
+ sgen_supported=true
# Required CFLAGS for s390[x]. USE_STRING_INLINES is automatic with gcc 4.1
CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
;;
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=yes
jit_wanted=true
+ sgen_supported=true
CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
;;
esac
AC_DEFINE(HAVE_DEPRECATED, 1, [Support for the deprecated attribute])
fi
+dnl
+dnl Simple Generational checks (sgen)
+dnl
+SGEN_DEFINES=
+AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=yes])
+if test x$buildsgen = xyes; then
+ if $sgen_supported; then
+ SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR -DHAVE_WRITE_BARRIERS"
+ gc_msg="sgen and $gc_msg"
+ else
+ buildsgen=no
+ AC_MSG_WARN("Sgen is not supported on this platform")
+ fi
+fi
+AC_SUBST(SGEN_DEFINES)
+AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes)
+
AC_ARG_WITH(jit, [ --with-jit=yes,no If you want to build scripts that default to the JIT (defaults to no)],[
if test x$withval = xyes; then
jit_wanted=true
BOEHM_DEFINES="$BOEHM_DEFINES -DMONO_DEBUGGER_SUPPORTED"
NESTED_LIBGC_FLAGS="-DMONO_DEBUGGER_SUPPORTED"
fi
+AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes)
AC_MSG_RESULT($mono_debugger_supported)
if test "x$with_tls" = "x__thread"; then
olive source: $olive_topdir
Engine:
- GC: $gc
+ GC: $gc_msg
GLIB: $with_glib
TLS: $with_tls
SIGALTSTACK: $with_sigaltstack
BigArrays: $enable_big_arrays
DTrace: $enable_dtrace
Parallel Mark: $enable_parallel_mark
- LLVM Back End: $enable_llvm
+ LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
Moon Profile: $with_moonlight
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
AC_MSG_WARN(Turning off static Mono is a risk, you might run into unexpected bugs)
fi
-
-if test x$gc = xsgen; then
- echo IMPORTANT:
- echo IMPORTANT: You have selected an experimental, work-in-progress
- echo IMPORTANT: GC engine. This GC engine is currently not supported
- echo IMPORTANT: and is not yet ready for use.
- echo IMPORTANT:
- echo IMPORTANT: There are known problems with it, use at your own risk.
-fi
-
-if test x$enable_llvm = xyes; then
- echo IMPORTANT:
- echo IMPORTANT: The LLVM Back End is experimental and has known problems.
- echo IMPORTANT:
-fi