summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTobias Droste <[email protected]>2017-02-07 19:53:32 +0000
committerEmil Velikov <[email protected]>2017-02-10 11:47:23 +0000
commit143c566a81fa7425df64ca83b8131e016af1d660 (patch)
tree3a492b3cceec2b5b624d801107253eece24a7b6f /configure.ac
parent04377cbdcf19a112c04035d622c40d722cc238d7 (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. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99010 Cc: "17.0" <[email protected]> Signed-off-by: Tobias Droste <[email protected]> v2 [Emil] fold within the existing conditional Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 11 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index a349bb13f0d..71c006e2fcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -959,7 +959,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
else
FOUND_LLVM=no
@@ -2395,14 +2394,18 @@ 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
+dnl Set defines and buildtime variables only when using LLVM.
+dnl
if test "x$enable_gallium_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])