[Mesa-dev] [PATCH v3 04/25] configure.ac: Move oCL checks out of LLVM version check
Tobias Droste
tdroste at gmx.de
Tue Oct 11 23:02:31 UTC 2016
The openCL checks don't need to be inside the LLVM version check.
"llvm_check_version_for" also works if LLVM wasn't found.
Signed-off-by: Tobias Droste <tdroste at gmx.de>
---
configure.ac | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/configure.ac b/configure.ac
index e48ed57..dcd59fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2284,24 +2284,8 @@ if test "x$enable_gallium_llvm" = xyes || test "x$HAVE_RADEON_VULKAN" = xyes; th
llvm_add_default_components
- if test "x$enable_opencl" = xyes; then
- llvm_check_version_for "3" "6" "0" "opencl"
-
- LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
- LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
- fi
DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
MESA_LLVM=1
-
- dnl Check for Clang internal headers
- if test "x$enable_opencl" = xyes; then
- if test -z "$CLANG_LIBDIR"; then
- CLANG_LIBDIR=${LLVM_LIBDIR}
- fi
- CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
- AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
- [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
- fi
else
MESA_LLVM=0
LLVM_VERSION_INT=0
@@ -2315,6 +2299,23 @@ else
fi
fi
+if test "x$enable_opencl" = xyes; then
+ llvm_check_version_for "3" "6" "0" "opencl"
+
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} all-targets ipo linker instrumentation"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} irreader option objcarcopts profiledata"
+fi
+
+dnl Check for Clang internal headers
+if test "x$enable_opencl" = xyes; then
+ if test -z "$CLANG_LIBDIR"; then
+ CLANG_LIBDIR=${LLVM_LIBDIR}
+ fi
+ CLANG_RESOURCE_DIR=$CLANG_LIBDIR/clang/${LLVM_VERSION}
+ AS_IF([test ! -f "$CLANG_RESOURCE_DIR/include/stddef.h"],
+ [AC_MSG_ERROR([Could not find clang internal header stddef.h in $CLANG_RESOURCE_DIR Use --with-clang-libdir to specify the correct path to the clang libraries.])])
+fi
+
dnl Directory for XVMC libs
AC_ARG_WITH([xvmc-libdir],
[AS_HELP_STRING([--with-xvmc-libdir=DIR],
--
2.10.0
More information about the mesa-dev
mailing list