Fix for x86 and amd64 continuations (#3182)
[mono.git] / configure.ac
index 1872536ce163ca57ce6073285d4cdf7048d72f93..0930a431abaebcf0602fcbe87ccb18c85f26865b 100644 (file)
@@ -740,12 +740,13 @@ AC_ARG_WITH(bitcode,         [  --with-bitcode=yes,no           If bitcode is en
 AC_ARG_WITH(xammac,          [  --with-xammac=yes,no            If you want to build the Xamarin.Mac assemblies (defaults to no)],    [], [with_xammac=default])
 AC_ARG_WITH(mobile_static,   [  --with-mobile_static=yes,no     If you want to build the mobile_static assemblies (defaults to no)],  [], [with_mobile_static=default])
 
-AC_ARG_WITH(runtime_preset, [  --with-runtime_preset=all,mobile_static,bitcode_mobile_static   Which default profile to build (defaults to all)],  [], [with_runtime_preset=all])
+AC_ARG_WITH(runtime_preset, [  --with-runtime_preset=net_4_x,all,mobile_static,bitcode_mobile_static   Which default profile to build (defaults to net_4_x)],  [], [with_runtime_preset=net_4_x])
 
 dnl
 dnl Profile defaults
 dnl
 TEST_PROFILE=default
+enable_llvm_default=no
 
 if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
    DISABLE_MCS_DOCS_default=yes
@@ -758,6 +759,16 @@ if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
    with_mobile_static_default=no
    with_bitcode_default=no
    with_cooperative_gc_default=no
+elif test x$with_runtime_preset = xnet_4_x; then
+   with_cooperative_gc_default=no
+   with_profile4_x_default=yes
+   with_monodroid_default=no
+   with_monotouch_default=no
+   with_monotouch_watch_default=no
+   with_monotouch_tv_default=no
+   with_xammac_default=no
+   with_mobile_static_default=no
+   with_bitcode_default=no
 elif test x$with_runtime_preset = xall; then
    with_cooperative_gc_default=no
    with_profile4_x_default=yes
@@ -793,6 +804,8 @@ elif test x$with_runtime_preset = xbitcode_mobile_static; then
    with_bitcode_default=yes
    with_cooperative_gc_default=yes
    TEST_PROFILE=mobile_static 
+   enable_llvm_default=yes
+   MONO_LLVMONLY=yes
 else
    with_profile4_x_default=yes
    with_monodroid_default=no
@@ -841,7 +854,8 @@ AM_CONDITIONAL(BITCODE, test "x$with_bitcode" = "xyes")
 AM_CONDITIONAL(INSTALL_XAMMAC, [test "x$with_xammac" != "xno"])
 AM_CONDITIONAL(INSTALL_MOBILE_STATIC, [test "x$with_mobile_static" != "xno"])
 
-# Make available to ./Makefile.am
+AC_SUBST(MONO_LLVMONLY)
+
 AC_SUBST(BITCODE)
 
 default_profile=net_4_x
@@ -2735,13 +2749,17 @@ dnl **************
 dnl ***  LLVM  ***
 dnl **************
 
-AC_ARG_ENABLE(llvm,[  --enable-llvm    Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=no)
+AC_ARG_ENABLE(llvm,[  --enable-llvm    Enable the LLVM back-end], enable_llvm=$enableval, enable_llvm=default)
 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=<llvm prefix>    Enable the LLVM back-end], enable_llvm=yes,)
 
+if test "x$enable_llvm" = "xdefault"; then
+   enable_llvm=$enable_llvm_default
+fi
+
 if test "x$enable_llvm" = "xyes"; then
    if test "x$with_llvm" != "x"; then
          LLVM_CONFIG=$with_llvm/bin/llvm-config
@@ -3737,7 +3755,7 @@ AC_ARG_WITH(mcs_docs,[  --with-mcs-docs=yes,no         If you want to build the
                DISABLE_MCS_DOCS=yes
        fi
 ])
-if test -z "$INSTALL_4_x_TRUE"; then :
+if test -n "$INSTALL_4_x_TRUE"; then :
        DISABLE_MCS_DOCS=yes
 fi
 if test "x$DISABLE_MCS_DOCS" = "xdefault"; then
@@ -4208,6 +4226,10 @@ fi
       echo "BCL_OPTIMIZE = 1" >> $srcdir/$mcsdir/build/config.make
     fi
 
+    if test "x$MONO_LLVMONLY" = "xyes" ; then
+      echo "MONO_LLVMONLY = 1" >> $srcdir/$mcsdir/build/config.make
+    fi
+
   fi
 
 )