[xbuild] Expression.ParseAs<T> - new method
[mono.git] / configure.in
index 47719144fa688b22a0fb8abc2193a4f14fd19a35..8012c62bcb981f01fba54233e616e7c7fe353186 100644 (file)
@@ -248,12 +248,12 @@ case "$host" in
                if test "x$cross_compiling" = "xyes"; then
                        has_broken_apple_cpp=yes
                fi
-               dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin10.0.0, but
+               dnl Snow Leopard is horribly broken -- it reports itself as i386-apple-darwin*, but
                dnl its gcc defaults to 64-bit mode.  They have also deprecated the usage of ucontext
                dnl we need to set some flags to build our 32-bit binaries on 10.6 properly
                case "$host" in
-                       dnl Snow Leopard config.guess reports as this
-                       i*86-*-darwin10*)
+                       dnl Snow Leopard and newer config.guess reports as this
+                       i*86-*-darwin*)
                                BROKEN_DARWIN_FLAGS="-arch i386 -D_XOPEN_SOURCE -mmacosx-version-min=10.5"
                                CPPFLAGS="$CPPFLAGS $BROKEN_DARWIN_FLAGS"
                                CFLAGS="$CFLAGS $BROKEN_DARWIN_FLAGS"
@@ -1547,6 +1547,12 @@ if test x$target_win32 = xno; then
                AC_DEFINE(HAVE_EPOLL, 1, [epoll supported])
        fi
 
+       havekqueue=no
+        AC_CHECK_FUNCS(kqueue, , AC_MSG_CHECKING(for kqueue in sys/event.h)
+                AC_TRY_LINK([#include <sys/event.h>], 
+                [ kqueue(); ], 
+                AC_DEFINE(HAVE_KQUEUE, 1, [Have kqueue]) AC_MSG_RESULT(yes),
+                AC_MSG_RESULT(no)))
        dnl ******************************
        dnl *** Checks for SIOCGIFCONF ***
        dnl ******************************
@@ -2241,7 +2247,7 @@ case "$host" in
                arch_target=arm;
                ACCESS_UNALIGNED="no"
                JIT_SUPPORTED=yes
-               CPPFLAGS="$CPPFLAGS -DARM_FPU_NONE=1"
+               CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__ -DHAVE_ARMV6=1"
                sgen_supported=true
                ;;
        arm*-linux*)
@@ -2304,6 +2310,29 @@ if test "x$host" != "x$target"; then
                AC_DEFINE(__mono_ilp32__, 1, [64 bit mode with 4 byte longs and pointers])
                sizeof_register=8
                ;;
+   armv7l-unknown-linux-gnueabi*)
+               # TEGRA
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__"
+               jit_wanted=true
+               # Can't use tls, since it depends on the runtime detection of tls offsets
+               # in mono-compiler.h
+               with_tls=pthread
+               ;;
+   armv5tel-unknown-linux-gnueabi*)
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
+               jit_wanted=true
+               # Can't use tls, since it depends on the runtime detection of tls offsets
+               # in mono-compiler.h
+               with_tls=pthread
+               ;;
        *)
                AC_MSG_WARN([Cross compiling is only supported for targets matching 'powerpc64-{ps3,xbox360}-linux-gnu'])
        esac
@@ -2327,6 +2356,9 @@ POWERPC64)
        AC_DEFINE(TARGET_POWERPC, 1, [...])
        AC_DEFINE(TARGET_POWERPC64, 1, [...])
        ;;
+S390x)
+       AC_DEFINE(TARGET_S390X, 1, [...])
+       ;;
 esac
 
 if test "x$sizeof_register" = "x4"; then
@@ -2530,6 +2562,16 @@ if test ${TARGET} = ARM && test x$cross_compiling = xno && test x$enable_mcs_bui
        AC_MSG_RESULT($fpu)
        CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
        unset fpu
+
+       AC_MSG_CHECKING(for ARMV6)
+       AC_TRY_RUN([
+               int main () { __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory"); return 0; }
+                       ], armv6=yes, armv6=no)
+
+       AC_MSG_RESULT($armv6)
+       if test ${armv6} = yes; then
+          AC_DEFINE(HAVE_ARMV6, 1, "Host supports ARMV6 instructions")
+       fi
 fi
 
 if test ${TARGET} = unknown; then