Skip to content

Commit a5979be

Browse files
committed
Auto merge of #25938 - wca:fix-clang-check-compatibility, r=alexcrichton
Not all /bin/sh have [[ available, so for compatibility using case..esac for pattern matching is better.
2 parents 2c8d75d + bc85eb4 commit a5979be

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

configure

+6-4
Original file line numberDiff line numberDiff line change
@@ -973,8 +973,8 @@ fi
973973

974974
if [ ! -z "$CFG_ENABLE_CLANG" ]
975975
then
976-
if [ -z "$CC" ] || [[ $CC == *clang ]]
977-
then
976+
case "$CC" in
977+
(''|*clang)
978978
CFG_CLANG_VERSION=$($CFG_CC \
979979
--version \
980980
| grep version \
@@ -994,9 +994,11 @@ then
994994
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
995995
;;
996996
esac
997-
else
997+
;;
998+
(*)
998999
msg "skipping CFG_ENABLE_CLANG version check; provided CC=$CC"
999-
fi
1000+
;;
1001+
esac
10001002
fi
10011003

10021004
if [ ! -z "$CFG_ENABLE_CCACHE" ]

0 commit comments

Comments
 (0)