Mercurial > hg > nginx
annotate auto/cc/conf @ 7622:2955192fb210
Version bump.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 05 Feb 2020 16:29:14 +0300 |
parents | 4925a6d13746 |
children | 9bcc5cc94ff4 |
rev | line source |
---|---|
455 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
455 | 4 |
5 | |
487 | 6 LINK="\$(CC)" |
7 | |
6383 | 8 MAIN_LINK= |
9 MODULE_LINK="-shared" | |
10 | |
455 | 11 ngx_include_opt="-I " |
12 ngx_compile_opt="-c" | |
6383 | 13 ngx_pic_opt="-fPIC" |
455 | 14 ngx_objout="-o " |
15 ngx_binout="-o " | |
16 ngx_objext="o" | |
17 ngx_binext= | |
6383 | 18 ngx_modext=".so" |
455 | 19 |
573 | 20 ngx_long_start= |
21 ngx_long_end= | |
22 | |
455 | 23 ngx_regex_dirsep="\/" |
24 ngx_dirsep='/' | |
25 | |
26 ngx_regex_cont=' \\\ | |
27 ' | |
28 ngx_cont=' \ | |
29 ' | |
30 ngx_tab=' \ | |
31 ' | |
32 ngx_spacer= | |
33 | |
573 | 34 ngx_long_regex_cont=$ngx_regex_cont |
35 ngx_long_cont=$ngx_cont | |
36 | |
455 | 37 . auto/cc/name |
38 | |
39 if test -n "$CFLAGS"; then | |
40 | |
41 CC_TEST_FLAGS="$CFLAGS $NGX_CC_OPT" | |
42 | |
43 case $NGX_CC_NAME in | |
44 | |
45 ccc) | |
46 # Compaq C V6.5-207 | |
47 | |
48 ngx_include_opt="-I" | |
49 ;; | |
50 | |
5366
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
51 sunc) |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
52 |
6383 | 53 MAIN_LINK= |
54 MODULE_LINK="-G" | |
55 | |
5366
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
56 case "$NGX_MACHINE" in |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
57 |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
58 i86pc) |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
59 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il" |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
60 ;; |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
61 |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
62 sun4u | sun4v) |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
63 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il" |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
64 ;; |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
65 |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
66 esac |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
67 |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
68 case $CPU in |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
69 |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
70 amd64) |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
71 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il" |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
72 ;; |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
73 |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
74 esac |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
75 ;; |
945aa9c7f282
Configure: fixed building with Sun C if CFLAGS set (ticket #65).
Maxim Dounin <mdounin@mdounin.ru>
parents:
4762
diff
changeset
|
76 |
455 | 77 esac |
78 | |
79 else | |
80 | |
81 case $NGX_CC_NAME in | |
82 gcc) | |
515 | 83 # gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2 |
84 # 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2 | |
561 | 85 # 4.0.0, 4.0.1, 4.1.0 |
455 | 86 |
87 . auto/cc/gcc | |
88 ;; | |
89 | |
4762
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
90 clang) |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
91 # Clang C compiler |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
92 |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
93 . auto/cc/clang |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
94 ;; |
182aee3b1bf5
Added the Clang compiler support.
Ruslan Ermilov <ru@nginx.com>
parents:
4412
diff
changeset
|
95 |
455 | 96 icc) |
515 | 97 # Intel C++ compiler 7.1, 8.0, 8.1 |
455 | 98 |
99 . auto/cc/icc | |
100 ;; | |
101 | |
561 | 102 sunc) |
103 # Sun C 5.7 Patch 117837-04 2005/05/11 | |
104 | |
105 . auto/cc/sunc | |
106 ;; | |
107 | |
467 | 108 ccc) |
515 | 109 # Compaq C V6.5-207 |
110 | |
111 . auto/cc/ccc | |
467 | 112 ;; |
455 | 113 |
515 | 114 acc) |
115 # aCC: HP ANSI C++ B3910B A.03.55.02 | |
116 | |
117 . auto/cc/acc | |
118 ;; | |
455 | 119 |
461 | 120 msvc*) |
121 # MSVC++ 6.0 SP2, MSVC++ Toolkit 2003 | |
455 | 122 |
123 . auto/cc/msvc | |
124 ;; | |
125 | |
126 owc) | |
127 # Open Watcom C 1.0, 1.2 | |
128 | |
129 . auto/cc/owc | |
130 ;; | |
131 | |
132 bcc) | |
133 # Borland C++ 5.5 | |
134 | |
135 . auto/cc/bcc | |
136 ;; | |
137 | |
138 esac | |
139 | |
515 | 140 CC_TEST_FLAGS="$CC_TEST_FLAGS $NGX_CC_OPT" |
455 | 141 |
142 fi | |
143 | |
144 CFLAGS="$CFLAGS $NGX_CC_OPT" | |
3367
568a854383f9
test invalid --with-ld-opt in right place
Igor Sysoev <igor@sysoev.ru>
parents:
3366
diff
changeset
|
145 NGX_TEST_LD_OPT="$NGX_LD_OPT" |
455 | 146 |
469 | 147 if [ "$NGX_PLATFORM" != win32 ]; then |
455 | 148 |
461 | 149 if test -n "$NGX_LD_OPT"; then |
150 ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\" | |
469 | 151 ngx_feature_name= |
461 | 152 ngx_feature_run=no |
153 ngx_feature_incs= | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
573
diff
changeset
|
154 ngx_feature_path= |
461 | 155 ngx_feature_libs= |
156 ngx_feature_test= | |
157 . auto/feature | |
158 | |
159 if [ $ngx_found = no ]; then | |
160 echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\" | |
161 echo | |
162 exit 1 | |
163 fi | |
164 fi | |
165 | |
3362
b57a4a704f3c
GCC 4.1 builtin atomic operations
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
166 |
6383 | 167 ngx_feature="-Wl,-E switch" |
168 ngx_feature_name= | |
169 ngx_feature_run=no | |
170 ngx_feature_incs= | |
171 ngx_feature_path= | |
172 ngx_feature_libs=-Wl,-E | |
173 ngx_feature_test= | |
174 . auto/feature | |
175 | |
176 if [ $ngx_found = yes ]; then | |
177 MAIN_LINK="-Wl,-E" | |
178 fi | |
179 | |
180 | |
6999
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
181 if [ "$NGX_CC_NAME" = "sunc" ]; then |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
182 echo "checking for gcc builtin atomic operations ... disabled" |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
183 else |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
184 ngx_feature="gcc builtin atomic operations" |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
185 ngx_feature_name=NGX_HAVE_GCC_ATOMIC |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
186 ngx_feature_run=yes |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
187 ngx_feature_incs= |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
188 ngx_feature_path= |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
189 ngx_feature_libs= |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
190 ngx_feature_test="long n = 0; |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
191 if (!__sync_bool_compare_and_swap(&n, 0, 1)) |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
192 return 1; |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
193 if (__sync_fetch_and_add(&n, 1) != 1) |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
194 return 1; |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
195 if (n != 2) |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
196 return 1; |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
197 __sync_synchronize();" |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
198 . auto/feature |
4925a6d13746
Configure: disabled gcc atomics with Sun C (ticket #1261).
Maxim Dounin <mdounin@mdounin.ru>
parents:
6998
diff
changeset
|
199 fi |
3362
b57a4a704f3c
GCC 4.1 builtin atomic operations
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
200 |
b57a4a704f3c
GCC 4.1 builtin atomic operations
Igor Sysoev <igor@sysoev.ru>
parents:
875
diff
changeset
|
201 |
517 | 202 if [ "$NGX_CC_NAME" = "ccc" ]; then |
515 | 203 echo "checking for C99 variadic macros ... disabled" |
204 else | |
205 ngx_feature="C99 variadic macros" | |
206 ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS" | |
207 ngx_feature_run=yes | |
208 ngx_feature_incs="#include <stdio.h> | |
209 #define var(dummy, ...) sprintf(__VA_ARGS__)" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
573
diff
changeset
|
210 ngx_feature_path= |
515 | 211 ngx_feature_libs= |
212 ngx_feature_test="char buf[30]; buf[0] = '0'; | |
213 var(0, buf, \"%d\", 1); | |
214 if (buf[0] != '1') return 1" | |
215 . auto/feature | |
6998 | 216 fi |
455 | 217 |
467 | 218 |
3673
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
219 ngx_feature="gcc variadic macros" |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
220 ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS" |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
221 ngx_feature_run=yes |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
222 ngx_feature_incs="#include <stdio.h> |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
223 #define var(dummy, args...) sprintf(args)" |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
224 ngx_feature_path= |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
225 ngx_feature_libs= |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
226 ngx_feature_test="char buf[30]; buf[0] = '0'; |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
227 var(0, buf, \"%d\", 1); |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
228 if (buf[0] != '1') return 1" |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
229 . auto/feature |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
230 |
e27070fb6c6b
try to use C99 variadic macros first:
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
231 |
6395
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
232 ngx_feature="gcc builtin 64 bit byteswap" |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
233 ngx_feature_name="NGX_HAVE_GCC_BSWAP64" |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
234 ngx_feature_run=no |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
235 ngx_feature_incs= |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
236 ngx_feature_path= |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
237 ngx_feature_libs= |
6621
0c3e464682e2
Configure: fix build with -Werror=unused-value.
Piotr Sikora <piotrsikora@google.com>
parents:
6395
diff
changeset
|
238 ngx_feature_test="if (__builtin_bswap64(0)) return 1" |
6395
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
239 . auto/feature |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
240 |
ba3c2ca21aa5
HTTP/2: implemented HPACK Huffman encoding for response headers.
Valentin Bartenev <vbart@nginx.com>
parents:
6383
diff
changeset
|
241 |
467 | 242 # ngx_feature="inline" |
469 | 243 # ngx_feature_name= |
467 | 244 # ngx_feature_run=no |
245 # ngx_feature_incs="int inline f(void) { return 1 }" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
573
diff
changeset
|
246 # ngx_feature_path= |
467 | 247 # ngx_feature_libs= |
248 # ngx_feature_test= | |
249 # . auto/feature | |
250 # | |
251 # if [ $ngx_found = yes ]; then | |
252 # fi | |
253 | |
455 | 254 fi |