mirror of git://anongit.mindrot.org/openssh.git
Allow for vendor prefix on clang version numbers.
Correctly detects the version of OpenBSD's native clang, as well as Apple's. Spotted tb@, ok djm@.
This commit is contained in:
parent
c52db01148
commit
2a19e02f36
|
@ -189,10 +189,11 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
|
|||
AC_MSG_CHECKING([clang version])
|
||||
ver="`$CC -v 2>&1`"
|
||||
if echo "$ver" | grep "Apple" >/dev/null; then
|
||||
CLANG_VER="apple-`echo "$ver" | \
|
||||
awk '/Apple LLVM/ {print $4"-"$5}'`"
|
||||
CLANG_VER=apple-`echo "$ver" | grep 'clang version' | \
|
||||
$SED 's/.*clang version //g' | $AWK '{print $1}'`
|
||||
else
|
||||
CLANG_VER=`echo "$ver" | $AWK '/clang version /{print $3}'`
|
||||
CLANG_VER=`echo "$ver" | grep 'clang version' | \
|
||||
$SED 's/.*clang version //g' | $AWK '{print $1}'`
|
||||
fi
|
||||
AC_MSG_RESULT([$CLANG_VER])
|
||||
|
||||
|
|
Loading…
Reference in New Issue