configure.ac: Create correct LLVM_VERSION_INT with minor >= 10
authorTobias Droste <tdroste@gmx.de>
Sat, 19 Nov 2016 01:39:12 +0000 (02:39 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 5 Dec 2016 14:43:47 +0000 (14:43 +0000)
This makes sure that we handle LLVM minor version >= 10 correctly.

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
configure.ac

index e731cf9c80edd79a99548947e09f2f008023b15b..adca49d31ead1bb48aabded430c4da9f3b09d9bf 100644 (file)
@@ -990,7 +990,11 @@ llvm_set_environment_variables() {
             LLVM_VERSION_PATCH=0
         fi
 
-        LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
+        if test "$LLVM_VERSION_MINOR" -lt 10; then
+            LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"
+        else
+            LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}"
+        fi
 
         DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
         MESA_LLVM=1