2006-02-28 Matt Hergett <matt@use.net>
[mono.git] / configure.in
index d7d07ef303cb45da00ae8ea131b3a328611db34e..82f80fd8a9e10b0d52a3e16ce2013fbaadd1df88 100644 (file)
@@ -81,6 +81,7 @@ case "$host" in
                CPPFLAGS="$CPPFLAGS -D_REENTRANT"
                libmono_cflags="-D_REENTRANT"
                LDFLAGS="$LDFLAGS -pthread"
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
                libmono_ldflags="-pthread"
                need_link_unlink=yes
                libdl=
@@ -104,6 +105,7 @@ case "$host" in
                        LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
                        libmono_ldflags="$PTHREAD_LIBS"
                fi
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD4"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID)
                libdl=
@@ -128,6 +130,7 @@ case "$host" in
                        LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
                        libmono_ldflags="$PTHREAD_LIBS"
                fi
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD5"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID)
                libdl=
@@ -154,6 +157,7 @@ case "$host" in
                        LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
                        libmono_ldflags="$PTHREAD_LIBS"
                fi
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD6"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID)
                libdl=
@@ -477,8 +481,25 @@ fi
 
 AM_CONDITIONAL(STATIC_MONO, test x$with_static_mono != xno)
 
+AC_ARG_WITH(xen_opt,   [  --with-xen_opt=yes,no      Enable Xen-specific behaviour],[],[with_xen_opt=yes])
+if test "x$with_xen_opt" = "xyes"; then
+       AC_DEFINE(MONO_XEN_OPT, 1, [Xen-specific behaviour])
+       ORIG_CFLAGS=$CFLAGS
+       CFLAGS="$CFLAGS -mno-tls-direct-seg-refs"
+       AC_MSG_CHECKING(for -mno-tls-direct-seg-refs option to gcc)
+       AC_TRY_COMPILE([], [
+                                          void main () { }
+       ], [
+          AC_MSG_RESULT(yes)
+       ], [
+          AC_MSG_RESULT(no)
+          CFLAGS=$ORIG_CFLAGS
+       ])
+fi
+
 AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsystems.
-  LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, reflection_emit.],
+  LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
+  reflection_emit, large_code, logging, com, ssa.],
 [
        for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
                eval "mono_feature_disable_$feature='yes'"
@@ -511,6 +532,22 @@ if test "x$mono_feature_disable_reflection_emit" = "xyes"; then
        AC_DEFINE(DISABLE_REFLECTION_EMIT, 1, [Disable reflection emit support])
 fi
 
+if test "x$mono_feature_disable_large_code" = "xyes"; then
+       AC_DEFINE(DISABLE_LARGE_CODE, 1, [Disable support for huge assemblies])
+fi
+
+if test "x$mono_feature_disable_logging" = "xyes"; then
+       AC_DEFINE(DISABLE_LOGGING, 1, [Disable support debug logging])
+fi
+
+if test "x$mono_feature_disable_com" = "xyes"; then
+       AC_DEFINE(DISABLE_COM, 1, [Disable COM support])
+fi
+
+if test "x$mono_feature_disable_ssa" = "xyes"; then
+       AC_DEFINE(DISABLE_SSA, 1, [Disable advanced SSA JIT optimizations])
+fi
+
 LIBGC_CFLAGS=
 LIBGC_LIBS=
 LIBGC_STATIC_LIBS=
@@ -906,6 +943,8 @@ if test x$platform_win32 = xno; then
                AC_DEFINE(USE_MONO_MUTEX)
        ])
        AC_CHECK_FUNCS(pthread_attr_setstacksize)
+       AC_CHECK_FUNCS(pthread_attr_getstack)
+       AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
 
        dnl ***********************************
        dnl *** Checks for working __thread ***
@@ -1451,6 +1490,7 @@ case "$host" in
                JIT_SUPPORTED=yes
                jit_wanted=true
                LIBC="libc.so.6.1"
+               INTL="libc.so.6.1"
                AC_CHECK_LIB(unwind, _U_dyn_register, [], [AC_MSG_ERROR(library libunwind not found)])
                libmono_ldflags="-lunwind"
                ;;
@@ -1642,6 +1682,22 @@ if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
        fi
 fi
 
+mono_debugger_supported=no
+if test "x$TARGET" = "xAMD64" -o "x$TARGET" = "xX86"; then
+       case "$host" in
+       *-*-*linux*)
+               mono_debugger_supported=yes
+               ;;
+       esac
+fi
+
+AC_MSG_CHECKING(if the Mono Debugger is supported on this platform)
+if test "x$mono_debugger_supported" = "xyes"; then
+       AC_DEFINE(MONO_DEBUGGER_SUPPORTED,1,[The Mono Debugger is supported on this platform])
+fi
+AC_MSG_RESULT($mono_debugger_supported)
+AM_CONDITIONAL(MONO_DEBUGGER_SUPPORTED, test x$mono_debugger_supported = xyes)
+
 if test "x$with_tls" = "x__thread"; then
        AC_DEFINE(HAVE_KW_THREAD)
    # Pass the information to libgc
@@ -1749,7 +1805,7 @@ AC_CONFIG_FILES([runtime/semdel-wrapper],[chmod +x runtime/semdel-wrapper])
 AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
 [   depth=../../../..
     case $srcdir in
-    [\\/$]* | ?:[\\/]* ) reldir=$srcdir ;;
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
     .) reldir=$depth ;;
     *) reldir=$depth/$srcdir ;;
     esac
@@ -1763,7 +1819,7 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
 AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
 [   depth=../../../..
     case $srcdir in
-    [\\/$]* | ?:[\\/]* ) reldir=$srcdir ;;
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
     .) reldir=$depth ;;
     *) reldir=$depth/$srcdir ;;
     esac