summaryrefslogtreecommitdiffhomepage
path: root/auto/cc
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2018-04-24 14:04:59 +0300
committerRuslan Ermilov <ru@nginx.com>2018-04-24 14:04:59 +0300
commit6ce439ebde10f618cc78622a8f919c3624767fda (patch)
tree43723fa7b8eabd61eff5819345eb9aa4ce4794c9 /auto/cc
parent644d26e841ec06023d0dc3eb9b624b404043c473 (diff)
downloadnginx-6ce439ebde10f618cc78622a8f919c3624767fda.tar.gz
nginx-6ce439ebde10f618cc78622a8f919c3624767fda.tar.bz2
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).
Diffstat (limited to 'auto/cc')
-rw-r--r--auto/cc/clang3
1 files changed, 2 insertions, 1 deletions
diff --git a/auto/cc/clang b/auto/cc/clang
index 9d900c258..a962ee234 100644
--- 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"