fi
fi
LLVM_PROF_ERR=no
-case $CC in
+
+# GNU Autoconf recommends the use of expr instead of basename.
+CC_BASENAME=$(expr "//$CC" : '.*/\(.*\)')
+case "$CC_BASENAME" in
*clang*)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
# ICC doesn't recognize the option, but only emits a warning
## XXX does it emit an unused result warning and can it be disabled?
- case $CC in #(
+ case "$CC_BASENAME" in #(
*icc*) :
ac_cv_disable_unused_result_warning=no
;;
esac
-case "$CC" in
+case "$CC_BASENAME" in
*mpicc*)
CFLAGS_NODIST="$CFLAGS_NODIST"
;;
fi
fi
LLVM_PROF_ERR=no
-case $CC in
+
+# GNU Autoconf recommends the use of expr instead of basename.
+AS_VAR_SET([CC_BASENAME], [$(expr "//$CC" : '.*/\(.*\)')])
+case "$CC_BASENAME" in
*clang*)
# Any changes made here should be reflected in the GCC+Darwin case below
PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
# ICC doesn't recognize the option, but only emits a warning
## XXX does it emit an unused result warning and can it be disabled?
- AS_CASE([$CC],
+ AS_CASE(["$CC_BASENAME"],
[*icc*], [ac_cv_disable_unused_result_warning=no]
[PY_CHECK_CC_WARNING([disable], [unused-result])])
AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes],
;;
esac
-case "$CC" in
+case "$CC_BASENAME" in
*mpicc*)
CFLAGS_NODIST="$CFLAGS_NODIST"
;;