[openssh-commits] [openssh] 01/02: Allow for vendor prefix on clang version numbers.

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Nov 21 14:08:44 AEDT 2023


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 2a19e02f36b16f0f6cc915f7d1e60ead5e36303b
Author: Darren Tucker <dtucker at dtucker.net>
Date:   Tue Nov 21 14:02:18 2023 +1100

    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 at .
---
 configure.ac | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index b951001a..92540d03 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])
 

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list