summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2012-07-21 11:43:06 +0100
committerJosé Fonseca <[email protected]>2012-07-21 11:43:35 +0100
commitbd9bf7a42473dfbdae4b61dd2556eba9529e9dd0 (patch)
tree5276e5bd5f6072c221137f76950807f7a87bff5b
parent735070c45b403a9631415b09e9fd519f601f0229 (diff)
autoconf: Only kink mcjit component when available.
Should fix build failures with older LLVM version, but only tested on LLVM 3.1.
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1d60957af5d..7b88331aeb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1847,10 +1847,14 @@ if test "x$enable_gallium_llvm" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
else
- LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter mcjit`"
+ LLVM_COMPONENTS="engine bitwriter"
+ if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
+ fi
if test "x$enable_opencl" = xyes; then
- LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs ipo linker instrumentation`"
+ LLVM_COMPONENTS="${LLVM_COMPONENTS} ipo linker instrumentation"
fi
+ LLVM_LIBS="`$LLVM_CONFIG --libs ${LLVM_COMPONENTS}`"
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
LLVM_BINDIR=`$LLVM_CONFIG --bindir`