# HG changeset patch # User Maxim Dounin # Date 1511444020 -10800 # Node ID 325b3042edd6fb0196a20d46739b49959782e39a # Parent 0a5e3d893a0cd4a4ada33ff8e64364896b321ba8 Configure: fixed clang detection on MINIX. 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. diff --git a/auto/cc/clang b/auto/cc/clang --- a/auto/cc/clang +++ b/auto/cc/clang @@ -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" diff --git a/auto/cc/name b/auto/cc/name --- a/auto/cc/name +++ b/auto/cc/name @@ -44,7 +44,11 @@ elif `$CC -v 2>&1 | grep 'gcc version' > 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"