autotools: Better describe which cases OProfileJIT is required.
authorJohannes Obermayr <johannesobermayr@gmx.de>
Tue, 9 Apr 2013 16:38:42 +0000 (17:38 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 9 Apr 2013 16:38:42 +0000 (17:38 +0100)
Signed-off-by: José Fonseca <jfonseca@vmware.com>
configure.ac

index e202e2db1aa369b0be49fd94f1b06c547250b196..6f8fc9d30ba32ddc714c2ff9b8219d9bc00c999d 100644 (file)
@@ -1644,8 +1644,12 @@ if test "x$enable_gallium_llvm" = xyes; then
         if $LLVM_CONFIG --components | grep -q '\<mcjit\>'; then
             LLVM_COMPONENTS="${LLVM_COMPONENTS} mcjit"
         fi
-        if $LLVM_CONFIG --components | grep -q '\<oprofilejit\>'; then
-            LLVM_COMPONENTS="${LLVM_COMPONENTS} oprofilejit"
+
+        if test "x$enable_debug" = xyes; then
+            # Debug builds require OProfileJIT if LLVM was built with support for it
+            if $LLVM_CONFIG --components | grep -q '\<oprofilejit\>'; then
+                LLVM_COMPONENTS="${LLVM_COMPONENTS} oprofilejit"
+            fi
         fi
 
         if test "x$enable_opencl" = xyes; then