Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
6396:dcfe355dfda4 | 6397:78f8ac479735 |
---|---|
23 | 23 |
24 fi | 24 fi |
25 | 25 |
26 | 26 |
27 if [ "$CC" = cl ]; then | 27 if [ "$CC" = cl ]; then |
28 if `$NGX_WINE $CC -v 2>&1 \ | 28 NGX_CC_NAME=msvc |
29 | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16' \ | 29 echo " + using Microsoft Visual C++ compiler" |
30 >/dev/null 2>&1`; then | |
31 | |
32 NGX_CC_NAME=msvc10 | |
33 echo " + using Microsoft Visual C++ 10 compiler" | |
34 | |
35 elif `$NGX_WINE $CC -v 2>&1 \ | |
36 | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14' \ | |
37 >/dev/null 2>&1`; then | |
38 | |
39 NGX_CC_NAME=msvc8 | |
40 echo " + using Microsoft Visual C++ 8 compiler" | |
41 | |
42 elif `$NGX_WINE $CC -v 2>&1 \ | |
43 | grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13' \ | |
44 >/dev/null 2>&1`; then | |
45 | |
46 NGX_CC_NAME=msvc7 | |
47 echo " + using Microsoft Visual C++ 7 compiler" | |
48 | |
49 else | |
50 NGX_CC_NAME=msvc | |
51 echo " + using Microsoft Visual C++ compiler" | |
52 fi | |
53 | 30 |
54 elif [ "$CC" = wcl386 ]; then | 31 elif [ "$CC" = wcl386 ]; then |
55 NGX_CC_NAME=owc | 32 NGX_CC_NAME=owc |
56 echo " + using Open Watcom C compiler" | 33 echo " + using Open Watcom C compiler" |
57 | 34 |