Skip to content

Commit bc85eb4

Browse files
committed
Use case..esac instead of [[.
Not all /bin/sh have [[ available, so for compatibility using case..esac for pattern matching is better.
1 parent a33b808 commit bc85eb4

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
@@ -977,8 +977,8 @@ fi
977977

978978
if [ ! -z "$CFG_ENABLE_CLANG" ]
979979
then
980-
if [ -z "$CC" ] || [[ $CC == *clang ]]
981-
then
980+
case "$CC" in
981+
(''|*clang)
982982
CFG_CLANG_VERSION=$($CFG_CC \
983983
--version \
984984
| grep version \
@@ -998,9 +998,11 @@ then
998998
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
999999
;;
10001000
esac
1001-
else
1001+
;;
1002+
(*)
10021003
msg "skipping CFG_ENABLE_CLANG version check; provided CC=$CC"
1003-
fi
1004+
;;
1005+
esac
10041006
fi
10051007

10061008
if [ ! -z "$CFG_ENABLE_CCACHE" ]

0 commit comments

Comments
 (0)