summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorJo Shields <directhex@apebox.org>2013-10-17 14:22:56 +0100
committerJo Shields <directhex@apebox.org>2013-10-17 14:22:56 +0100
commitb5c7654dd78182fdb806f0558b71aa37c8d05cd4 (patch)
treee6c40084b490e91590658a7914ca2e75b768718b /configure.in
parentfb760275736ee20c5ba59c61ef6bb2f7fb1f8955 (diff)
parentd0a215f5626219ff7927f576588a777e5331c7be (diff)
downloadmono-b5c7654dd78182fdb806f0558b71aa37c8d05cd4.tar.gz
Merge branch 'upstream-experimental' into master-experimental-patches/kfreebsd_support
Diffstat (limited to 'configure.in')
-rwxr-xr-x[-rw-r--r--]configure.in175
1 files changed, 107 insertions, 68 deletions
diff --git a/configure.in b/configure.in
index 9a25516f46..d6421070aa 100644..100755
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
-AC_INIT(mono, [3.2.1],
+AC_INIT(mono, [3.2.3],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README])
@@ -13,7 +13,7 @@ AC_CANONICAL_HOST
# The extra brackets are to foil regex-based scans.
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
-AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign])
+AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign subdir-objects])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
@@ -24,6 +24,12 @@ AC_PROG_LN_S
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+case $host_os in
+*cygwin* )
+ echo "Run configure using ./configure --host=i686-pc-mingw32"
+ exit 1
+esac
+
# In case of cygwin, override LN_S, irrespective of what it determines.
# The build uses cygwin, but the actual runtime doesn't.
case $host_os in
@@ -105,22 +111,6 @@ case "$host" in
if test "x$host" == "x$build" -a "x$host" == "x$target"; then
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32])
fi
- #
- # gcc-3/g++-3 are from the gcc-core/gcc-g++ cygwin packages.
- # Other gcc packages will not work:
- # - the gcc-4 packages no longer support -mno-cygwin
- # - the mingw-gcc packages produce executables which depends on a libgcc<...>
- # dll, which means we would have to distribute that file too.
- #
- if test "x$CC" != "x"; then
- AC_ERROR(Don't set CC. mono can only be compiled with gcc-3 from the 'gcc-core' package)
- fi
- CC="gcc-3.exe -mno-cygwin -g"
- CXX="g++-3.exe -mno-cygwin -g"
- # So libgc configure gets -mno-cygwin
- export CC
- export CXX
- CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin"
else
target_win32=yes
AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])
@@ -130,8 +120,8 @@ case "$host" in
# Windows 2000 is required that includes Internet Explorer 5.01
CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32"
- libmono_cflags="-mno-cygwin -mms-bitfields -mwindows"
- libmono_ldflags="-mno-cygwin -mms-bitfields -mwindows"
+ libmono_cflags="-mms-bitfields -mwindows"
+ libmono_ldflags="-mms-bitfields -mwindows"
libdl=
libgc_threads=win32
gc_default=included
@@ -384,6 +374,7 @@ AC_PROG_CXX
AM_PROG_AS
AC_PROG_INSTALL
AC_PROG_AWK
+AM_PROG_CC_C_O
dnl We should use AM_PROG_AS, but it's not available on automake/aclocal 1.4
: ${CCAS='$(CC)'}
# Set ASFLAGS if not already set.
@@ -502,6 +493,12 @@ AC_TRY_LINK([#include <math.h>], [
# We'll have to use signals
AC_MSG_RESULT(no)
])
+# mingw
+AC_CHECK_FUNCS(_finite, , AC_MSG_CHECKING(for _finite in math.h)
+ AC_TRY_LINK([#include <math.h>],
+ [ _finite(0.0); ],
+ AC_DEFINE(HAVE__FINITE, 1, [Have _finite in -lm]) AC_MSG_RESULT(yes),
+ AC_MSG_RESULT(no)))
# for Linux statfs support
AC_CHECK_HEADERS(linux/magic.h)
@@ -1161,6 +1158,8 @@ if test x$target_win32 = xno; then
AC_CHECK_HEADERS(execinfo.h)
+ AC_CHECK_HEADERS(sys/auxv.h)
+
AC_CHECK_FUNCS(getgrgid_r)
AC_CHECK_FUNCS(getgrnam_r)
AC_CHECK_FUNCS(getpwnam_r)
@@ -1594,6 +1593,10 @@ if test x$target_win32 = xno; then
AC_MSG_RESULT(disabled)
else
AC_TRY_RUN([
+ #if defined(__APPLE__) && defined(__clang__)
+ #error "__thread does not currently work with clang on Mac OS X"
+ #endif
+
#include <pthread.h>
__thread int i;
static int res1, res2;
@@ -2386,14 +2389,18 @@ if test "x$enable_llvm" = "xyes"; then
;;
esac
-
# The output of --cflags seems to include optimizations flags too
LLVM_CFLAGS=`$LLVM_CONFIG --cflags | sed -e 's/-O2//g' | sed -e 's/-O0//g' | sed -e 's/-fomit-frame-pointer//g' | sed -e 's/-fPIC//g'`
# LLVM is compiled with -fno-rtti, so we need this too, since our classes inherit
# from LLVM classes.
LLVM_CXXFLAGS="`$LLVM_CONFIG --cxxflags` -fno-rtti"
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
- LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit mcjit $llvm_codegen`
+ if test "x$host" != "x$target"; then
+ # No need for jit libs
+ LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter`
+ else
+ LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit mcjit $llvm_codegen`
+ fi
LLVM_LIBS="$LLVM_LDFLAGS $LLVM_LIBS -lstdc++"
# Should be something like '2.6' or '2.7svn'
@@ -2497,7 +2504,7 @@ case "$host" in
have_visibility_hidden=no
sgen_supported=true
;;
- cygwin*)
+ mingw*|cygwin*)
sgen_supported=true
have_visibility_hidden=no
;;
@@ -2603,9 +2610,9 @@ case "$host" in
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
- CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DHAVE_ARMV6=1"
+ CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
# libgc's gc_locks.h depends on this
- CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC"
sgen_supported=true
;;
arm*-linux*)
@@ -2627,7 +2634,7 @@ case "$host" in
# AOT_SUPPORTED="no"
# ;;
s390x-*-linux*)
- TARGET=S390x;
+ TARGET=S390X;
arch_target=s390x;
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=yes
@@ -2647,7 +2654,7 @@ if test "x$host" != "x$target"; then
arch_target=arm;
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
- CPPFLAGS="$CPPFLAGS -D__ARM_EABI__ -DHAVE_ARMV6=1"
+ 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
@@ -2736,7 +2743,6 @@ if test "x$host" != "x$target"; then
esac
fi
-# FIXME: Define the others as well
case "$TARGET" in
X86)
AC_DEFINE(TARGET_X86, 1, [...])
@@ -2754,14 +2760,32 @@ POWERPC64)
AC_DEFINE(TARGET_POWERPC, 1, [...])
AC_DEFINE(TARGET_POWERPC64, 1, [...])
;;
-S390x)
+S390X)
AC_DEFINE(TARGET_S390X, 1, [...])
;;
MIPS)
AC_DEFINE(TARGET_MIPS, 1, [...])
;;
+IA64)
+ AC_DEFINE(TARGET_IA64, 1, [...])
+ ;;
+SPARC)
+ AC_DEFINE(TARGET_SPARC, 1, [...])
+ ;;
+SPARC64)
+ AC_DEFINE(TARGET_SPARC64, 1, [...])
+ ;;
esac
+dnl Use GCC atomic ops if they work on the target.
+if test x$GCC = "xyes"; then
+ case $TARGET in
+ X86 | AMD64 | ARM | POWERPC | POWERPC64 | MIPS)
+ AC_DEFINE(USE_GCC_ATOMIC_OPS, 1, [...])
+ ;;
+ esac
+fi
+
if test "x$target_mach" = "xyes"; then
if test "x$TARGET" = "xARM"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
@@ -3051,18 +3075,54 @@ if test ${TARGET} = ARM; then
CPPFLAGS="$CPPFLAGS -DARM_FPU_$fpu=1"
unset fpu
- if test x$cross_compiling = xno; then
- 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")
- # libgc's gc_locks.h depends on this
- CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6"
- fi
+ dnl *********************************************
+ dnl *** Check which ARM version(s) we can use ***
+ dnl *********************************************
+ AC_MSG_CHECKING(which ARM version to use)
+
+ AC_TRY_COMPILE([], [
+ #if !defined(__ARM_ARCH_5T__) && !defined(__ARM_ARCH_5TE__) && !defined(__ARM_ARCH_5TEJ__)
+ #error Not on ARM v5.
+ #endif
+ return 0;
+ ], [
+ arm_v5=yes
+ ], [])
+
+ AC_TRY_COMPILE([], [
+ #if !defined(__ARM_ARCH_6J__) && !defined(__ARM_ARCH_6ZK__) && !defined(__ARM_ARCH_6K__) && !defined(__ARM_ARCH_6T2__) && !defined(__ARM_ARCH_6M__)
+ #error Not on ARM v6.
+ #endif
+ return 0;
+ ], [
+ arm_v5=yes
+ arm_v6=yes
+ ], [])
+
+ AC_TRY_COMPILE([], [
+ #if !defined(__ARM_ARCH_7A__) && !defined(__ARM_ARCH_7R__) && !defined(__ARM_ARCH_7EM__) && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7S__)
+ #error Not on ARM v7.
+ #endif
+ return 0;
+ ], [
+ arm_v5=yes
+ arm_v6=yes
+ arm_v7=yes
+ ], [])
+
+ if test x$arm_v5 = xyes; then
+ AC_DEFINE(HAVE_ARMV5, 1, [ARM v5])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV5=1"
+ fi
+
+ if test x$arm_v6 = xyes; then
+ AC_DEFINE(HAVE_ARMV6, 1, [ARM v6])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV6=1"
+ fi
+
+ if test x$arm_v7 = xyes; then
+ AC_DEFINE(HAVE_ARMV7, 1, [ARM v7])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DHAVE_ARMV7=1"
fi
fi
@@ -3143,20 +3203,6 @@ if test x$with_profile4 != xyes; then
DISABLE_MCS_DOCS=yes
fi
-MOONLIGHT_DEFINES=
-AC_ARG_WITH(moonlight, [ --with-moonlight=yes|no|only If you want to build Mono for Moonlight (defaults to no)],[
- if test x$with_moonlight != xno; then
- MOONLIGHT_DEFINES="-DMOONLIGHT -DDISABLE_ASSEMBLY_REMAPPING "
- fi
-], [with_moonlight=no])
-AC_SUBST(MOONLIGHT_DEFINES)
-
-AC_ARG_WITH(moon_gc, [ --with-moon-gc=boehm,sgen Select the gc to use with Moonlight (defaults to boehm)],[
- if test "x$with_moon_gc" != "xsgen"; then
- with_moon_gc=boehm
- fi
-], [with_moon_gc=boehm])
-
AC_ARG_WITH(lazy_gc_thread_creation, [ --with-lazy-gc-thread-creation=yes|no Enable lazy runtime thread creation, embedding host must do it explicitly (defaults to no)],[
if test x$with_lazy_gc_thread_creation != xno ; then
AC_DEFINE(LAZY_GC_THREAD_CREATION,1,[Enable lazy gc thread creation by the embedding host.])
@@ -3180,7 +3226,11 @@ fi
if test "x$enable_shared" = "xno" -a "x$enable_executables" = "xyes"; then
LIBMONO_LA=libmini-static.la
else
- LIBMONO_LA=libmonosgen-$API_VER.la
+ if test x$buildsgen = xyes; then
+ LIBMONO_LA=libmonosgen-$API_VER.la
+ else
+ LIBMONO_LA=libmonoboehm-$API_VER.la
+ fi
fi
AC_SUBST(LIBMONO_LA)
@@ -3212,12 +3262,6 @@ AC_SUBST(OPROFILE_LIBS)
libmono_ldflags="$libmono_ldflags $LIBS"
-AM_CONDITIONAL(MOONLIGHT, [test "x$with_moonlight" != "xno"])
-
-AM_CONDITIONAL(ONLY_MOONLIGHT, [test "x$with_moonlight" = "xonly"])
-AM_CONDITIONAL(MOONLIGHT_BOEHM, [test "x$with_moon_gc" = "xboehm"])
-AM_CONDITIONAL(MOONLIGHT_SGEN, [test "x$with_moon_gc" = "xsgen"])
-
AM_CONDITIONAL(INSTALL_2_0, [test "x$with_profile2" = xyes])
AM_CONDITIONAL(INSTALL_4_0, [test "x$with_profile4" = xyes])
AM_CONDITIONAL(INSTALL_4_5, [test "x$with_profile4_5" = xyes])
@@ -3233,12 +3277,11 @@ AM_CONDITIONAL(SPARC64, test x$TARGET = xSPARC64)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(AMD64, test x$TARGET = xAMD64)
AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
-AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
AM_CONDITIONAL(POWERPC64, test x$TARGET = xPOWERPC64)
AM_CONDITIONAL(ARM, test x$TARGET = xARM)
-AM_CONDITIONAL(S390x, test x$TARGET = xS390x)
+AM_CONDITIONAL(S390X, test x$TARGET = xS390X)
AM_CONDITIONAL(HOST_X86, test x$HOST = xX86)
AM_CONDITIONAL(HOST_AMD64, test x$HOST = xAMD64)
AM_CONDITIONAL(HOST_ARM, test x$HOST = xARM)
@@ -3574,10 +3617,6 @@ fi
echo "DISABLE_MCS_DOCS = yes" >> $mcs_topdir/build/config.make
fi
- if test x$with_moonlight != xno; then
- echo "MOONLIGHT = 1" >> $srcdir/$mcsdir/build/config.make
- fi
-
if test x$has_extension_module != xno; then
echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
fi