Revert "Merge branch 'master' of https://github.com/mono/mono"
[mono.git] / configure.in
index 65b27c5a2108ff43dac8ec48d35fa91f4d2150c8..efa860b17ef53ab73d88ea985b6a65da47082efc 100644 (file)
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 #AC_PREREQ([2.62])
 
-AC_INIT(mono, [3.4.1],
+AC_INIT(mono, m4_esyscmd([tr -d '\r\n' <  MONO_VERSION]),
         [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
 
 AC_CONFIG_SRCDIR([README.md])
@@ -548,7 +548,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"
+                  WARN="$WARN -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign"
                fi
 else
        # The Sun Forte compiler complains about inline functions that access static variables
@@ -2452,16 +2452,20 @@ if test "x$enable_llvm" = "xyes"; then
    llvm_version=`$LLVM_CONFIG --version`
    major_version=`echo $llvm_version | cut -c 1`
    minor_version=`echo $llvm_version | cut -c 3`
+   llvm_api_version=`$LLVM_CONFIG --mono-api-version 2>/dev/null`
    AC_MSG_CHECKING(LLVM version)
    AC_MSG_RESULT($llvm_version)
    if echo $llvm_version | grep -q 'mono'; then
-         AC_DEFINE(LLVM_MONO_BRANCH, 1, [Whenever we are using the mono branch of LLVM])
-         LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_MONO_BRANCH"       
          if test "x$enable_llvm_version_check" == "xyes"; then
                 if test "$llvm_version" != "$expected_llvm_version"; then
                        AC_MSG_ERROR([Expected llvm version $expected_llvm_version, but llvm-config --version returned $llvm_version"])
                 fi
          fi
+         if test "x$llvm_api_version" = "x"; then
+               LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=0"
+         else
+               LLVM_CXXFLAGS="$LLVM_CXXFLAGS -DLLVM_API_VERSION=$llvm_api_version"
+         fi
    else
          AC_MSG_ERROR([Compiling with stock LLVM is not supported, please use the Mono LLVM repo at https://github.com/mono/llvm, with the GIT branch which matches this version of mono, i.e. 'mono-2-10' for Mono 2.10.])
    fi