]> git.kaiwu.me - nginx.git/commitdiff
Configure: fixed clang detection on MINIX.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Nov 2017 13:33:40 +0000 (16:33 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 23 Nov 2017 13:33:40 +0000 (16:33 +0300)
As per POSIX, basic regular expressions have no alternations, and the
interpretation of the "\|" construct is undefined.  At least on MINIX
and Solaris grep interprets "\|" as literal "|", and not as an alternation
as GNU grep does.  Removed such constructs introduced in f1daa0356a1d.
This fixes clang detection on MINIX.

auto/cc/clang
auto/cc/name

index 19bdaaaa04e465903c993dd4ab45288fd0ca64db..9d900c258178f1ee3986f3b173afe19393822bca 100644 (file)
@@ -5,7 +5,7 @@
 # clang
 
 
-NGX_CLANG_VER=`$CC -v 2>&1 | grep '\(clang\|LLVM\) version' 2>&1 \
+NGX_CLANG_VER=`$CC -v 2>&1 | grep 'version' 2>&1 \
                            | sed -e 's/^.* version \(.*\)/\1/'`
 
 echo " + clang version: $NGX_CLANG_VER"
index 35d319e615bc6454a8f849d6fce79243fe778c7d..ded93f5bc98901e7cddffc771f228333856f1e8e 100644 (file)
@@ -44,7 +44,11 @@ elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
     NGX_CC_NAME=gcc
     echo " + using GNU C compiler"
 
-elif `$CC -v 2>&1 | grep '\(clang\|LLVM\) version' >/dev/null 2>&1`; then
+elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
+    NGX_CC_NAME=clang
+    echo " + using Clang C compiler"
+
+elif `$CC -v 2>&1 | grep 'LLVM version' >/dev/null 2>&1`; then
     NGX_CC_NAME=clang
     echo " + using Clang C compiler"