summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-09-25 12:55:40 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2014-09-27 17:50:52 +0100
commit907da04eb62541c7d5a56113de8b95b98b28283e (patch)
tree21233c797592e28510aa22ebabd1aa30100fc8c4 /configure.ac
parent18336b99b2c8d71569bdb89a6c3cb93880cd3fc3 (diff)
configure.ac: Compute LLVM_VERSION_PATCH using llvm-config
This is the only guaranteed way get the patch level for llvm, since the define cannot always be found in config.h depending on the version of llvm or the build system used. CC: 10.2 10.3 <mesa-stable@lists.freedesktop.org> Reviewed-by: Jonathan Gray <jsg@jsg.id.au> (cherry picked from commit ec566e0f169dac33814463e913e5d844a782c61e)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 4 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index c7212b7bc4b..9f940ef55fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1631,11 +1631,10 @@ if test "x$enable_gallium_llvm" = xyes; then
AC_COMPUTE_INT([LLVM_VERSION_MINOR], [LLVM_VERSION_MINOR],
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
- dnl In LLVM 3.4.1 patch level was defined in config.h and not
- dnl llvm-config.h
- AC_COMPUTE_INT([LLVM_VERSION_PATCH], [LLVM_VERSION_PATCH],
- [#include "${LLVM_INCLUDEDIR}/llvm/Config/config.h"],
- LLVM_VERSION_PATCH=0) dnl Default if LLVM_VERSION_PATCH not found
+ LLVM_VERSION_PATCH=`echo $LLVM_VERSION | cut -d. -f3 | egrep -o '^[[0-9]]+'`
+ if test -z "$LLVM_VERSION_PATCH"; then
+ LLVM_VERSION_PATCH=0
+ fi
if test -n "${LLVM_VERSION_MAJOR}"; then
LLVM_VERSION_INT="${LLVM_VERSION_MAJOR}0${LLVM_VERSION_MINOR}"