diff auto/cc/name @ 6397:78f8ac479735

Win32: simplified and improved handling of MSVC versions. Now we always set NGX_CC_NAME to "msvc", and additionally test compiler version as reported by "cl" in auto/cc/msvc (the same version is also available via the _MSC_VER define). In particular, this approach allows to properly check for C99 variadic macros support, which previously was not used with MSVC versions not explicitly recognized. Now unneeded wildcards in NGX_CC_NAME tests for msvc removed accordingly, as well as unused wildcards for owc and icc.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 13 Feb 2016 06:47:34 +0300
parents f1daa0356a1d
children 325b3042edd6
line wrap: on
line diff
--- a/auto/cc/name
+++ b/auto/cc/name
@@ -25,31 +25,8 @@ fi
 
 
 if [ "$CC" = cl ]; then
-    if `$NGX_WINE $CC -v 2>&1 \
-        | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16' \
-        >/dev/null 2>&1`; then
-
-        NGX_CC_NAME=msvc10
-        echo " + using Microsoft Visual C++ 10 compiler"
-
-    elif `$NGX_WINE $CC -v 2>&1 \
-        | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14' \
-        >/dev/null 2>&1`; then
-
-        NGX_CC_NAME=msvc8
-        echo " + using Microsoft Visual C++ 8 compiler"
-
-    elif `$NGX_WINE $CC -v 2>&1 \
-        | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13' \
-        >/dev/null 2>&1`; then
-
-        NGX_CC_NAME=msvc7
-        echo " + using Microsoft Visual C++ 7 compiler"
-
-    else
-        NGX_CC_NAME=msvc
-        echo " + using Microsoft Visual C++ compiler"
-    fi
+    NGX_CC_NAME=msvc
+    echo " + using Microsoft Visual C++ compiler"
 
 elif [ "$CC" = wcl386 ]; then
     NGX_CC_NAME=owc