summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-01-18 13:54:04 +0000
committerEmil Velikov <[email protected]>2017-02-10 11:47:24 +0000
commitd4840c0c26315fe4f0ba82e2b0d81cd9f2636f5e (patch)
tree56591a3633d26c000dcdd914ff99971dd42300d9
parentce65cc1f1f648f17d9284e65f1ad69be647de3d3 (diff)
configure.ac: correctly manage llvm auto-detection
Earlier refactoring commits changed from one, dare I say it, broken behaviour to another. Namely: Before, as you explicitly --enable-gallium-llvm your selection was ignored when llvm-config was not present/detected. Today, the "auto" heuristics enables gallium llvm regardless if you have llvm/llvm-config available or not. Rework the auto-detection to attribute for llvm's presence. v2: Set enable_gallium_llvm=no when LLVM is not found. Cc: "17.0" <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tobias Droste <[email protected]> Reported-by: Samuel Pitoiset <[email protected]> Tested-by: Samuel Pitoiset <[email protected]>
-rw-r--r--configure.ac12
1 files changed, 8 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 1251b83c408..af0a3fb9256 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1729,10 +1729,14 @@ AC_ARG_ENABLE([gallium-llvm],
[enable_gallium_llvm=auto])
if test "x$enable_gallium_llvm" = xauto; then
- case "$host_cpu" in
- i*86|x86_64|amd64) enable_gallium_llvm=yes;;
- *) enable_gallium_llvm=no;;
- esac
+ if test "x$FOUND_LLVM" = xyes; then
+ case "$host_cpu" in
+ i*86|x86_64|amd64) enable_gallium_llvm=yes;;
+ *) enable_gallium_llvm=no;;
+ esac
+ else
+ enable_gallium_llvm=no
+ fi
fi
if test "x$enable_gallium_llvm" = xyes -a "x$FOUND_LLVM" = xno; then