[master] 456c12b39 build: Query clang from the $PATH

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Jul 2 09:58:07 UTC 2020


commit 456c12b39a25f294210bfc4ee94110cedcf41826
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Jul 2 11:53:32 2020 +0200

    build: Query clang from the $PATH
    
    It might not be installed as /usr/bin/clang, and there's a mismatch
    anyway between the check and the outcome.
    
    For example on my system's $PATH clang is currently driven by ccache
    is available at /usr/lib64/ccache/clang.

diff --git a/autogen.des b/autogen.des
index 96a488f9e..7fffce8c3 100755
--- a/autogen.des
+++ b/autogen.des
@@ -9,7 +9,7 @@ set -ex
 make -k distclean > /dev/null 2>&1 || true
 
 # Prefer CLANG if we have it, and have not given preferences
-if [ -f /usr/bin/clang -a "x${CC}" = "x" ] ; then
+if command -v clang >/dev/null && test -z "$CC" ; then
 	CC=clang
 	export CC
 fi


More information about the varnish-commit mailing list