In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h when
LLVM was built via autoconf and not when it was built with cmake.
Fall back to retrieving the patch level from llvm-config --version to
handle this case.

Cc: "10.2 10.3" <mesa-sta...@lists.freedesktop.org>
Signed-off-by: Jonathan Gray <j...@jsg.id.au>
---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index 99ae6ba..98cd938 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1705,6 +1705,15 @@ if test "x$enable_gallium_llvm" = xyes; then
             [#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
             LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
 
+        dnl In LLVM 3.4.1 and 3.4.2 the patch level was only set in config.h
+        dnl for autoconf builds and not cmake builds
+        if test "$LLVM_VERSION_PATCH" -eq 0; then
+            LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3`
+            if test -z "$LLVM_VERSION_PATCH"; then
+                LLVM_VERSION_PATCH=0
+            fi
+        fi
+
         if test -n "${LLVM_VERSION_MAJOR}"; then
             LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
         else
-- 
1.9.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to