summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Droste <[email protected]>2016-12-08 03:03:37 +0100
committerEmil Velikov <[email protected]>2017-01-18 13:23:01 +0000
commitb045d23c0b804074a7fbc849d7098d51056ccb6b (patch)
tree16d7b6ac75943913ee1d4908843a9ff26df635c0
parent38e81293b0f5d0361c83f80f1d5b32a2a8a67feb (diff)
configure.ac: Only define HAVE_LLVM if LLVM is used
Make sure that HAVE_LLVM compiler define is only set if LLVM is actually used. Signed-off-by: Tobias Droste <[email protected]> v2 [Emil] fold within the existing conditional Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r--configure.ac16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index d86d6a31991..9c9c316c4e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -997,7 +997,6 @@ llvm_set_environment_variables() {
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"
FOUND_LLVM=yes
USE_LLVM=no
else
@@ -2582,14 +2581,17 @@ if test "x$HAVE_GALLIUM_ETNAVIV" != xyes -a "x$HAVE_GALLIUM_IMX" == xyes ; then
AC_ERROR([Building with imx requires etnaviv])
fi
-dnl Set LLVM_LIBS - This is done after the driver configuration so
-dnl that drivers can add additional components to LLVM_COMPONENTS.
-dnl Previously, gallium drivers were updating LLVM_LIBS directly
-dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
-dnl this was causing the same libraries to be appear multiple times
-dnl in LLVM_LIBS.
+dnl Set HAVE_LLVM compiler define if LLVM is used.
if test "x$USE_LLVM" == xyes; then
+ DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
+
+ dnl Set LLVM_LIBS - This is done after the driver configuration so
+ dnl that drivers can add additional components to LLVM_COMPONENTS.
+ dnl Previously, gallium drivers were updating LLVM_LIBS directly
+ dnl by calling llvm-config --libs ${DRIVER_LLVM_COMPONENTS}, but
+ dnl this was causing the same libraries to be appear multiple times
+ dnl in LLVM_LIBS.
if ! $LLVM_CONFIG --libs ${LLVM_COMPONENTS} >/dev/null; then
AC_MSG_ERROR([Calling ${LLVM_CONFIG} failed])