# HG changeset patch # User Ruslan Ermilov # Date 1524567899 -10800 # Node ID ceab908790c4eb7cd01c40bd16581ef794222ca5 # Parent fa0e093b64d77e138cd9d8b7e7ef03cc56bd7f4a Configure: fixed clang version detection (closes #1539). While 325b3042edd6 fixed it on MINIX, it broke it on systems that output the word "version" on several lines with "cc -v". The fix is to only consider "clang version" or "LLVM version" as clang version, but this time only using sed(1). diff --git a/auto/cc/clang b/auto/cc/clang --- a/auto/cc/clang +++ b/auto/cc/clang @@ -6,7 +6,8 @@ NGX_CLANG_VER=`$CC -v 2>&1 | grep 'version' 2>&1 \ - | sed -e 's/^.* version \(.*\)/\1/'` + | sed -n -e 's/^.*clang version \(.*\)/\1/p' \ + -e 's/^.*LLVM version \(.*\)/\1/p'` echo " + clang version: $NGX_CLANG_VER"