X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=configure.ac;h=be1e231bd300cd04cb94c6240fd59b29383a27b2;hb=61d6cac99c7a967c0439e46c34ebf1b4191c6752;hp=2d28b82dfcee53b8f394d35dc7cbca529523c6e9;hpb=d14254989b16f832f12f10300806bc85af899fe9;p=mono.git diff --git a/configure.ac b/configure.ac index 2d28b82dfce..be1e231bd30 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,11 @@ 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 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 @@ -413,7 +417,7 @@ AC_PROG_LD_GNU AM_ICONV() AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h sys/prctl.h) -AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h) +AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/sem.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h unwind.h) AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h], [], [], [#include #include @@ -542,7 +546,7 @@ if test x"$GCC" = xyes; then if test "x$mono_cv_clang" = "xyes"; then # https://bugzilla.samba.org/show_bug.cgi?id=8118 WARN="$WARN -Qunused-arguments" - WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign" + WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address" fi else # The Sun Forte compiler complains about inline functions that access static variables @@ -739,7 +743,8 @@ AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsy AC_DEFINE_UNQUOTED(DISABLED_FEATURES, "$DISABLED_FEATURES", [String of disabled features]) if test "x$mono_feature_disable_aot" = "xyes"; then - AC_DEFINE(DISABLE_AOT_COMPILER, 1, [Disable AOT Compiler]) + AC_DEFINE(DISABLE_AOT, 1, [Disable AOT Compiler]) + enable_system_aot=no AC_MSG_NOTICE([Disabled AOT compiler]) fi @@ -1073,6 +1078,12 @@ AC_CHECK_FUNCS(sigaction) AC_CHECK_FUNCS(kill) AC_CHECK_FUNCS(signal) +# signal() is declared inline in Android headers +# so we need to workaround it by overriding the check. +if test x$platform_android = xyes; then + AC_DEFINE(HAVE_SIGNAL,1) +fi + if test x$host_win32 = xno; then dnl hires monotonic clock support @@ -2071,7 +2082,7 @@ if test x$host_win32 = xno; then 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 @@ -2364,8 +2375,6 @@ if test "x$ac_cv_truncl" != "xyes"; then 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 **************************** @@ -2560,6 +2569,13 @@ if test "x$enable_nacl_gc" = "xyes"; then fi AC_SUBST(MONO_NACL_ALIGN_MASK_OFF) +dnl ************************** +dnl *** AOT cross offsets *** +dnl ************************** + +AC_ARG_WITH(cross-offsets, [ --with-cross-offsets= Explicit AOT cross offsets file], + AC_DEFINE_UNQUOTED(MONO_OFFSETS_FILE, "$withval", [AOT cross offsets file])) + dnl ************** dnl *** LLVM *** dnl ************** @@ -2567,6 +2583,7 @@ dnl ************** AC_ARG_ENABLE(llvm,[ --enable-llvm Enable the 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) AC_ARG_ENABLE(llvm-version-check,[ --enable-llvm-version-check Check that the LLVM matches the version expected by mono], enable_llvm_version_check=$enableval, enable_llvm_version_check=no) +AC_ARG_ENABLE(llvm-runtime,[ --enable-llvm-runtime Enable runtime support for llvmonly code], enable_llvm_runtime=$enableval, enable_llvm_runtime=no) AC_ARG_WITH(llvm, [ --with-llvm= Enable the LLVM back-end], enable_llvm=yes,) @@ -2597,19 +2614,26 @@ if test "x$enable_llvm" = "xyes"; then # 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 -- -` if test "x$host" != "x$target"; then # No need for jit libs - LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter` + LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter` else - LLVM_LIBS=`$LLVM_CONFIG --libs core bitwriter jit mcjit $llvm_codegen` + LLVM_LIBS=`$LLVM_CONFIG --libs analysis core bitwriter jit mcjit $llvm_codegen` + fi + LLVM_LIBS="$LLVM_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS" + # The c++ standard library used by llvm doesn't show up in $LLVM_SYSTEM_LIBS so add it manually + if echo $LLVM_CXXFLAGS | grep -q -- '-stdlib=libc++'; then + LLVM_LIBS="$LLVM_LIBS -lc++" + else + LLVM_LIBS="$LLVM_LIBS -lstdc++" fi - LLVM_LIBS="$LLVM_LIBS $LLVM_LDFLAGS $LLVM_SYSTEM_LIBS -lstdc++" expected_llvm_version="3.4svn-mono-mono/e656cac" @@ -2630,7 +2654,7 @@ if test "x$enable_llvm" = "xyes"; then 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 \ @@ -2638,6 +2662,7 @@ if test "x$enable_llvm" = "xyes"; then -lLLVMARMAsmPrinter -lLLVMTableGen -lLLVMDebugInfo -lLLVMOption -lLLVMX86Disassembler \ -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86Desc \ -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMJIT \ + -lLLVMAnalysis -lLLVMTarget \ -lLLVMIRReader -lLLVMAsmParser -lLLVMLineEditor -lLLVMMCAnalysis -lLLVMInstrumentation \ -lLLVMInterpreter -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils \ -lLLVMipa -lLLVMAnalysis -lLLVMProfileData -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld \ @@ -2672,6 +2697,14 @@ if test "x$enable_loadedllvm" = "xyes"; then fi AM_CONDITIONAL(LOADED_LLVM, [test x$enable_loadedllvm = xyes]) +if test "x$enable_llvm" = "xyes"; then + enable_llvm_runtime=yes +fi +if test "x$enable_llvm_runtime" = "xyes"; then + AC_DEFINE(ENABLE_LLVM_RUNTIME, 1, [Runtime support code for llvm enabled]) +fi +AM_CONDITIONAL(ENABLE_LLVM_RUNTIME, [test x$enable_llvm_runtime = xyes]) + TARGET="unknown" ACCESS_UNALIGNED="yes" @@ -2825,6 +2858,14 @@ case "$host" in ;; 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; @@ -2873,6 +2914,11 @@ if test "x$host" != "x$target"; then # 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 @@ -3087,7 +3133,12 @@ if test x$GCC = "xyes"; then 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" @@ -3421,10 +3472,12 @@ case "x$libgc" in ;; 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, Enable oprofile support (defaults to no)],[ @@ -3511,6 +3564,8 @@ if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then with_profile4_x=no with_monodroid=no with_monotouch=no + with_monotouch_watch=no + with_monotouch_tv=no with_xammac=no fi @@ -3533,6 +3588,8 @@ libmono_ldflags="$libmono_ldflags $LIBS" 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) @@ -3767,6 +3824,7 @@ AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/ AC_OUTPUT([ Makefile mono-uninstalled.pc +acceptance-tests/Makefile scripts/mono-find-provides scripts/mono-find-requires mono/Makefile @@ -3947,13 +4005,15 @@ echo " 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