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
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])