From 66715646d11e8ba46ea36f0259e5b7d0ddea8f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sun, 4 Sep 2016 16:18:13 +0200 Subject: [PATCH] Respect user's CC --- autogen.des | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autogen.des b/autogen.des index 8d69dc4..bddccc1 100755 --- a/autogen.des +++ b/autogen.des @@ -5,20 +5,21 @@ has() { } # BullseyeCoverage needs to know exactly which compiler we're using -if has clang clang++ ; then +if has "${CC}" "${CXX}" ; then + echo "using CC=${CC}" +elif has clang clang++ ; then echo "using Clang" export CC="${CC:-clang}" - export CPP="${CPP:-${CC} -E}" export CXX="${CXX:-clang++}" elif has gcc g++ ; then echo "using GCC" export CC="${CC:-gcc}" - export CPP="${CPP:-gcc -E}" export CXX="${CXX:-g++}" else echo "WARNING: using default compiler," \ "coverage analysis may not work" fi +export CPP="${CPP:-${CC} -E}" set -e