# 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 subdir-objects])
+AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip foreign subdir-objects]
+ m4_esyscmd([case `automake --version | head -n 1` in # parallel-tests is default in automake 1.13+, we need to explicitly enable it
+ *1.11*|*1.12*) echo parallel-tests;; # for 1.11 and 1.12 but not below as those versions don't recognize the flag
+ esac])) # TODO: remove this hack once we require automake 1.11+
+
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE
AC_CHECK_FUNCS(readv writev preadv pwritev)
AC_CHECK_FUNCS(setpgid)
AC_CHECK_FUNCS(system)
- AC_CHECK_FUNCS(fork execve)
+ AC_CHECK_FUNCS(fork execv execve)
AC_CHECK_SIZEOF(size_t)
AC_CHECK_TYPES([blksize_t], [AC_DEFINE(HAVE_BLKSIZE_T)], ,
[#include <sys/types.h>
#include <fcntl.h>])
AC_CHECK_TYPES([struct iovec], [AC_DEFINE(HAVE_STRUCT_IOVEC)], ,
[#include <sys/uio.h>])
+ AC_CHECK_TYPES([struct linger], [AC_DEFINE(HAVE_STRUCT_LINGER)], ,
+ [#include <sys/socket.h>])
AC_CHECK_TYPES([struct pollfd], [AC_DEFINE(HAVE_STRUCT_POLLFD)], ,
[#include <sys/poll.h>])
AC_CHECK_TYPES([struct stat], [AC_DEFINE(HAVE_STRUCT_STAT)], ,
AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL, 1, [Has the 'aintl' function]) LIBS="$LIBS -lsunmath"])
fi
-AC_CHECK_FUNCS(round)
-AC_CHECK_FUNCS(rint)
AC_CHECK_FUNCS(execvp)
dnl ****************************
# 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_CXXFLAGS=`$LLVM_CONFIG --cxxflags | 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_CXXFLAGS="$LLVM_CXXFLAGS -fno-rtti -fexceptions"
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
# This might include empty lines
LLVM_SYSTEM_LIBS=`$LLVM_CONFIG --system-libs 2>/dev/null | grep -- -`
else
LLVM_CFLAGS="-I$with_llvm/include -DNDEBUG -D__NO_CTYPE_INLINE -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
- LLVM_CXXFLAGS="$LLVM_CFLAGS -std=gnu++11 -fvisibility-inlines-hidden -fno-exceptions -fno-rtti -Woverloaded-virtual -Wcast-qual"
+ LLVM_CXXFLAGS="$LLVM_CFLAGS -std=gnu++11 -fvisibility-inlines-hidden -fno-rtti -Woverloaded-virtual -Wcast-qual"
LLVM_LDFLAGS="-L$with_llvm/lib"
LLVM_SYSTEM_LIBS="-lshell32 -lpsapi -limagehlp -ldbghelp -lm"
LLVM_LIBS="-lLLVMLTO -lLLVMObjCARCOpts -lLLVMLinker -lLLVMipo -lLLVMVectorize -lLLVMBitWriter \
sizeof_register="SIZEOF_VOID_P"
jit_wanted=true
-sgen_supported=false
boehm_supported=true
case "$host" in
mips*)
TARGET=MIPS;
arch_target=mips;
- sgen_supported=true
ACCESS_UNALIGNED="no"
AC_MSG_CHECKING(for mips n32)
# foo.c:6: warning: visibility attribute not supported in this configuration; ignored
# ld: fatal: relocation error: R_386_GOTOFF: file /var/tmp//ccxYR96k.o: symbol astruct: relocation must bind locally
have_visibility_hidden=no
- sgen_supported=true
;;
mingw*|cygwin*)
- sgen_supported=true
have_visibility_hidden=no
;;
haiku*)
LIBC=libroot.so
;;
linux*)
- sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*)
- sgen_supported=true
AOT_SUPPORTED="yes"
;;
openbsd*|freebsd*|kfreebsd-gnu*)
- sgen_supported=true
;;
esac
;;
fi
case $host_os in
linux*)
- sgen_supported=true
AOT_SUPPORTED="yes"
;;
darwin*)
- sgen_supported=true
AOT_SUPPORTED="yes"
;;
openbsd*|freebsd*|kfreebsd-gnu*)
- sgen_supported=true
;;
mingw*)
- sgen_supported=true
;;
esac
case "$host" in
if test x"$AR" = xfalse; then
AC_MSG_ERROR([The required utility 'ar' is not found in your PATH. Usually it can be found in /usr/ccs/bin.])
fi
- sgen_supported=true
;;
*-mingw*|*-*-cygwin*)
# When this is enabled, it leads to very strange crashes at runtime (gcc-3.4.4)
arch_target=ppc;
case $host_os in
linux*|darwin*)
- sgen_supported=true
;;
esac
;;
+ armv7k-*-darwin*)
+ TARGET=ARM;
+ TARGET_SYS=WATCHOS
+ arch_target=arm;
+ ACCESS_UNALIGNED="no"
+ CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
+ ;;
+
arm*-darwin*)
TARGET=ARM;
arch_target=arm;
ACCESS_UNALIGNED="no"
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
- sgen_supported=true
;;
arm*-linux*)
TARGET=ARM;
arch_target=arm;
ACCESS_UNALIGNED="no"
- sgen_supported=true
AOT_SUPPORTED="yes"
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
;;
# TARGET=ARM;
# arch_target=arm;
# ACCESS_UNALIGNED="no"
-# sgen_supported=true
# AOT_SUPPORTED="no"
# ;;
aarch64-*)
# https://lkml.org/lkml/2012/7/15/133
TARGET=ARM64
arch_target=arm64
- sgen_supported=true
boehm_supported=false
;;
s390x-*-linux*)
TARGET=S390X;
arch_target=s390x;
ACCESS_UNALIGNED="yes"
- sgen_supported=true
CFLAGS="$CFLAGS -mbackchain -D__USE_STRING_INLINES"
;;
esac
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
+ case "$target" in
+ armv7k-*)
+ AC_DEFINE(TARGET_WATCHOS, 1, [...])
+ ;;
+ esac
;;
powerpc64-ps3-linux-gnu)
TARGET=POWERPC64
AC_DEFINE(TARGET_X86, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
- sgen_supported=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(TARGET_ANDROID, 1, [...])
CPPFLAGS="$CPPFLAGS"
- sgen_supported=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
AC_DEFINE(TARGET_AMD64, 1, [...])
AC_DEFINE(TARGET_PS4, 1, [...])
CPPFLAGS="$CPPFLAGS"
- sgen_supported=true
# Can't use tls, since it depends on the runtime detection of tls offsets
# in mono-compiler.h
with_tls=pthread
fi
if test "x$target_mach" = "xyes"; then
- if test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64"; then
+
+ if test "x$TARGET_SYS" = "xWATCHOS"; then
+ AC_DEFINE(TARGET_WATCHOS,1,[The JIT/AOT targets WatchOS])
+ CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
+ CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_WATCHOS"
+ elif test "x$TARGET" = "xARM" -o "x$TARGET" = "xARM64"; then
AC_DEFINE(TARGET_IOS,1,[The JIT/AOT targets iOS])
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
dnl
dnl Simple Generational checks (sgen)
dnl
-if $sgen_supported; then
- build_sgen_default=yes
-else
- build_sgen_default=no
-fi
SGEN_DEFINES=
-AC_ARG_WITH(sgen, [ --with-sgen=yes,no Extra Generational GC, default=yes],[buildsgen=$with_sgen],[buildsgen=$build_sgen_default])
+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"
- gc_msg="sgen and $gc_msg"
- else
- buildsgen=no
- AC_MSG_WARN("Sgen is not supported on this platform")
- fi
+ SGEN_DEFINES="-DHAVE_SGEN_GC -DHAVE_MOVING_COLLECTOR"
+ gc_msg="sgen and $gc_msg"
fi
AC_SUBST(SGEN_DEFINES)
AM_CONDITIONAL(SUPPORT_SGEN, test x$buildsgen = xyes)
;;
esac
-AC_ARG_WITH(profile4_x,[ --with-profile4=yes,no If you want to install the 4.6 FX (defaults to yes)], [], [with_profile4_x=yes])
-AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
-AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=no])
-AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
+AC_ARG_WITH(profile4_x, [ --with-profile4=yes,no If you want to install the 4.6 FX (defaults to yes)], [], [with_profile4_x=yes])
+AC_ARG_WITH(monodroid, [ --with-monodroid=yes,no If you want to build the MonoDroid assemblies (defaults to no)], [], [with_monodroid=no])
+AC_ARG_WITH(monotouch, [ --with-monotouch=yes,no If you want to build the Xamarin.iOS assemblies (defaults to no)], [], [with_monotouch=no])
+AC_ARG_WITH(monotouch_watch, [ --with-monotouch_watch=yes,no If you want to build the Xamarin.WatchOS assemblies (defaults to no)],[], [with_monotouch_watch=no])
+AC_ARG_WITH(monotouch_tv, [ --with-monotouch_tv=yes,no If you want to build the Xamarin.TVOS assemblies (defaults to no)], [], [with_monotouch_tv=no])
+AC_ARG_WITH(xammac, [ --with-xammac=yes,no If you want to build the Xamarin.Mac assemblies (defaults to no)], [], [with_xammac=no])
OPROFILE=no
AC_ARG_WITH(oprofile,[ --with-oprofile=no,<oprofile install dir> Enable oprofile support (defaults to no)],[
fi
], [with_cooperative_gc=no])
+AC_ARG_WITH(checked_build, [ --with-checked-build=yes|no Enable checked build (expensive asserts)) (defaults to no)],[
+ if test x$with_checked_build != xno ; then
+ AC_DEFINE(CHECKED_BUILD,1,[Enable checked build.])
+ fi
+], [with_checked_build=no])
+
+
AC_CHECK_HEADER([malloc.h],
[AC_DEFINE([HAVE_USR_INCLUDE_MALLOC_H], [1],
[Define to 1 if you have /usr/include/malloc.h.])],,)
with_profile4_x=no
with_monodroid=no
with_monotouch=no
+ with_monotouch_watch=no
+ with_monotouch_tv=no
with_xammac=no
fi
AM_CONDITIONAL(INSTALL_4_x, [test "x$with_profile4_x" = xyes])
AM_CONDITIONAL(INSTALL_MONODROID, [test "x$with_monodroid" != "xno"])
AM_CONDITIONAL(INSTALL_MONOTOUCH, [test "x$with_monotouch" != "xno"])
+AM_CONDITIONAL(INSTALL_MONOTOUCH_WATCH, [test "x$with_monotouch_watch" != "xno"])
+AM_CONDITIONAL(INSTALL_MONOTOUCH_TV, [test "x$with_monotouch_tv" != "xno"])
AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm)
Libraries:
- .NET 4.6: $with_profile4_x
- MonoDroid: $with_monodroid
- MonoTouch: $with_monotouch
- Xamarin.Mac: $with_xammac
- JNI support: $jdk_headers_found
- libgdiplus: $libgdiplus_msg
- zlib: $zlib_msg
+ .NET 4.6: $with_profile4_x
+ Xamarin.Android: $with_monodroid
+ Xamarin.iOS: $with_monotouch
+ Xamarin.WatchOS: $with_monotouch_watch
+ Xamarin.TVOS: $with_monotouch_tv
+ Xamarin.Mac: $with_xammac
+ JNI support: $jdk_headers_found
+ libgdiplus: $libgdiplus_msg
+ zlib: $zlib_msg
$disabled
"
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then