0
|
1
|
|
2 # Copyright (C) Igor Sysoev
|
|
3
|
4
|
4
|
0
|
5 help=no
|
|
6
|
18
|
7 NGX_PREFIX=
|
|
8 NGX_SBIN_PATH=
|
324
|
9 NGX_CONF_PREFIX=
|
18
|
10 NGX_CONF_PATH=
|
|
11 NGX_ERROR_LOG_PATH=
|
|
12 NGX_PID_PATH=
|
160
|
13 NGX_LOCK_PATH=
|
4
|
14 NGX_USER=
|
|
15 NGX_GROUP=
|
0
|
16
|
4
|
17 CC=${CC:-gcc}
|
0
|
18 CPP=
|
4
|
19 NGX_OBJS=objs
|
0
|
20
|
18
|
21 NGX_DEBUG=NO
|
4
|
22 NGX_CC_OPT=
|
|
23 NGX_LD_OPT=
|
0
|
24 CPU=NO
|
|
25
|
336
|
26 NGX_RPATH=NO
|
|
27
|
18
|
28 NGX_TEST_BUILD_DEVPOLL=NO
|
236
|
29 NGX_TEST_BUILD_EVENTPORT=NO
|
18
|
30 NGX_TEST_BUILD_EPOLL=NO
|
|
31 NGX_TEST_BUILD_RTSIG=NO
|
22
|
32 NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
|
0
|
33
|
18
|
34 NGX_PLATFORM=
|
10
|
35 NGX_WINE=
|
|
36
|
0
|
37 EVENT_FOUND=NO
|
|
38
|
|
39 EVENT_RTSIG=NO
|
|
40 EVENT_SELECT=NO
|
|
41 EVENT_POLL=NO
|
|
42 EVENT_AIO=NO
|
|
43
|
|
44 USE_THREADS=NO
|
|
45
|
448
|
46 NGX_IPV6=NO
|
|
47
|
0
|
48 HTTP=YES
|
28
|
49
|
|
50 NGX_HTTP_LOG_PATH=
|
|
51 NGX_HTTP_CLIENT_TEMP_PATH=
|
|
52 NGX_HTTP_PROXY_TEMP_PATH=
|
|
53 NGX_HTTP_FASTCGI_TEMP_PATH=
|
|
54
|
464
|
55 HTTP_CACHE=YES
|
0
|
56 HTTP_CHARSET=YES
|
|
57 HTTP_GZIP=YES
|
|
58 HTTP_SSL=NO
|
46
|
59 HTTP_SSI=YES
|
58
|
60 HTTP_POSTPONE=NO
|
122
|
61 HTTP_REALIP=NO
|
392
|
62 HTTP_XSLT=NO
|
296
|
63 HTTP_SUB=NO
|
178
|
64 HTTP_ADDITION=NO
|
182
|
65 HTTP_DAV=NO
|
0
|
66 HTTP_ACCESS=YES
|
52
|
67 HTTP_AUTH_BASIC=YES
|
0
|
68 HTTP_USERID=YES
|
6
|
69 HTTP_AUTOINDEX=YES
|
406
|
70 HTTP_RANDOM_INDEX=NO
|
0
|
71 HTTP_STATUS=NO
|
34
|
72 HTTP_GEO=YES
|
138
|
73 HTTP_MAP=YES
|
126
|
74 HTTP_REFERER=YES
|
0
|
75 HTTP_REWRITE=YES
|
|
76 HTTP_PROXY=YES
|
28
|
77 HTTP_FASTCGI=YES
|
148
|
78 HTTP_PERL=NO
|
130
|
79 HTTP_MEMCACHED=YES
|
272
|
80 HTTP_LIMIT_ZONE=YES
|
416
|
81 HTTP_LIMIT_REQ=YES
|
126
|
82 HTTP_EMPTY_GIF=YES
|
236
|
83 HTTP_BROWSER=YES
|
412
|
84 HTTP_SECURE_LINK=NO
|
244
|
85 HTTP_FLV=NO
|
358
|
86 HTTP_GZIP_STATIC=NO
|
260
|
87 HTTP_UPSTREAM_IP_HASH=YES
|
0
|
88
|
36
|
89 # STUB
|
|
90 HTTP_STUB_STATUS=NO
|
|
91
|
290
|
92 MAIL=NO
|
|
93 MAIL_SSL=NO
|
336
|
94 MAIL_POP3=YES
|
|
95 MAIL_IMAP=YES
|
|
96 MAIL_SMTP=YES
|
0
|
97
|
38
|
98 NGX_ADDONS=
|
16
|
99
|
0
|
100 USE_PCRE=NO
|
|
101 PCRE=NONE
|
|
102 PCRE_OPT=
|
|
103
|
|
104 USE_OPENSSL=NO
|
|
105 OPENSSL=NONE
|
|
106
|
|
107 USE_MD5=NO
|
|
108 MD5=NONE
|
|
109 MD5_OPT=
|
|
110 MD5_ASM=NO
|
|
111
|
202
|
112 USE_SHA1=NO
|
|
113 SHA1=NONE
|
|
114 SHA1_OPT=
|
|
115 SHA1_ASM=NO
|
|
116
|
0
|
117 USE_ZLIB=NO
|
|
118 ZLIB=NONE
|
|
119 ZLIB_OPT=
|
|
120 ZLIB_ASM=NO
|
|
121
|
148
|
122 USE_PERL=NO
|
|
123 NGX_PERL=perl
|
|
124
|
392
|
125 USE_LIBXSLT=NO
|
|
126
|
370
|
127 NGX_GOOGLE_PERFTOOLS=NO
|
394
|
128 NGX_CPP_TEST=NO
|
370
|
129
|
138
|
130 NGX_CPU_CACHE_LINE=
|
|
131
|
482
|
132 opt=
|
0
|
133
|
|
134 for option
|
|
135 do
|
482
|
136 opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
|
|
137
|
0
|
138 case "$option" in
|
|
139 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
|
|
140 *) value="" ;;
|
|
141 esac
|
|
142
|
|
143 case "$option" in
|
|
144 --help) help=yes ;;
|
|
145
|
482
|
146 --prefix=) NGX_PREFIX="!" ;;
|
18
|
147 --prefix=*) NGX_PREFIX="$value" ;;
|
|
148 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
|
|
149 --conf-path=*) NGX_CONF_PATH="$value" ;;
|
|
150 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
|
|
151 --pid-path=*) NGX_PID_PATH="$value" ;;
|
160
|
152 --lock-path=*) NGX_LOCK_PATH="$value" ;;
|
4
|
153 --user=*) NGX_USER="$value" ;;
|
|
154 --group=*) NGX_GROUP="$value" ;;
|
0
|
155
|
18
|
156 --crossbuild=*) NGX_PLATFORM="$value" ;;
|
0
|
157
|
4
|
158 --builddir=*) NGX_OBJS="$value" ;;
|
0
|
159
|
|
160 --with-rtsig_module) EVENT_RTSIG=YES ;;
|
|
161 --with-select_module) EVENT_SELECT=YES ;;
|
|
162 --without-select_module) EVENT_SELECT=NONE ;;
|
|
163 --with-poll_module) EVENT_POLL=YES ;;
|
|
164 --without-poll_module) EVENT_POLL=NONE ;;
|
|
165 --with-aio_module) EVENT_AIO=YES ;;
|
|
166
|
372
|
167 #--with-threads=*) USE_THREADS="$value" ;;
|
|
168 #--with-threads) USE_THREADS="pthreads" ;;
|
0
|
169
|
448
|
170 --with-ipv6) NGX_IPV6=YES ;;
|
|
171
|
0
|
172 --without-http) HTTP=NO ;;
|
464
|
173 --without-http-cache) HTTP_CACHE=NO ;;
|
|
174
|
18
|
175 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
|
28
|
176 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
|
|
177 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
|
|
178 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
|
0
|
179
|
|
180 --with-http_ssl_module) HTTP_SSL=YES ;;
|
122
|
181 --with-http_realip_module) HTTP_REALIP=YES ;;
|
178
|
182 --with-http_addition_module) HTTP_ADDITION=YES ;;
|
392
|
183 --with-http_xslt_module) HTTP_XSLT=YES ;;
|
296
|
184 --with-http_sub_module) HTTP_SUB=YES ;;
|
182
|
185 --with-http_dav_module) HTTP_DAV=YES ;;
|
244
|
186 --with-http_flv_module) HTTP_FLV=YES ;;
|
358
|
187 --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
|
406
|
188 --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
|
412
|
189 --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
|
182
|
190
|
0
|
191 --without-http_charset_module) HTTP_CHARSET=NO ;;
|
|
192 --without-http_gzip_module) HTTP_GZIP=NO ;;
|
|
193 --without-http_ssi_module) HTTP_SSI=NO ;;
|
|
194 --without-http_userid_module) HTTP_USERID=NO ;;
|
|
195 --without-http_access_module) HTTP_ACCESS=NO ;;
|
52
|
196 --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
|
6
|
197 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
|
0
|
198 --without-http_status_module) HTTP_STATUS=NO ;;
|
34
|
199 --without-http_geo_module) HTTP_GEO=NO ;;
|
138
|
200 --without-http_map_module) HTTP_MAP=NO ;;
|
130
|
201 --without-http_referer_module) HTTP_REFERER=NO ;;
|
0
|
202 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
|
|
203 --without-http_proxy_module) HTTP_PROXY=NO ;;
|
28
|
204 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
|
130
|
205 --without-http_memcached_module) HTTP_MEMCACHED=NO ;;
|
272
|
206 --without-http_limit_zone_module) HTTP_LIMIT_ZONE=NO ;;
|
416
|
207 --without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
|
130
|
208 --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
|
236
|
209 --without-http_browser_module) HTTP_BROWSER=NO ;;
|
260
|
210 --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
|
0
|
211
|
148
|
212 --with-http_perl_module) HTTP_PERL=YES ;;
|
|
213 --with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
|
|
214 --with-perl=*) NGX_PERL="$value" ;;
|
|
215
|
36
|
216 # STUB
|
|
217 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
|
|
218
|
290
|
219 --with-mail) MAIL=YES ;;
|
|
220 --with-mail_ssl_module) MAIL_SSL=YES ;;
|
|
221 # STUB
|
|
222 --with-imap) MAIL=YES ;;
|
|
223 --with-imap_ssl_module) MAIL_SSL=YES ;;
|
336
|
224 --without-mail_pop3_module) MAIL_POP3=NO ;;
|
|
225 --without-mail_imap_module) MAIL_IMAP=NO ;;
|
|
226 --without-mail_smtp_module) MAIL_SMTP=NO ;;
|
0
|
227
|
370
|
228 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
|
396
|
229 --with-cpp_test_module) NGX_CPP_TEST=YES ;;
|
370
|
230
|
38
|
231 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
|
16
|
232
|
0
|
233 --with-cc=*) CC="$value" ;;
|
|
234 --with-cpp=*) CPP="$value" ;;
|
4
|
235 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
|
|
236 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
|
0
|
237 --with-cpu-opt=*) CPU="$value" ;;
|
18
|
238 --with-debug) NGX_DEBUG=YES ;;
|
0
|
239
|
|
240 --without-pcre) USE_PCRE=DISABLED ;;
|
464
|
241 --with-pcre) USE_PCRE=YES ;;
|
0
|
242 --with-pcre=*) PCRE="$value" ;;
|
|
243 --with-pcre-opt=*) PCRE_OPT="$value" ;;
|
|
244
|
|
245 --with-openssl=*) OPENSSL="$value" ;;
|
50
|
246 --with-openssl-opt=*) OPENSSL_OPT="$value" ;;
|
0
|
247
|
|
248 --with-md5=*) MD5="$value" ;;
|
|
249 --with-md5-opt=*) MD5_OPT="$value" ;;
|
|
250 --with-md5-asm) MD5_ASM=YES ;;
|
|
251
|
202
|
252 --with-sha1=*) SHA1="$value" ;;
|
|
253 --with-sha1-opt=*) SHA1_OPT="$value" ;;
|
|
254 --with-sha1-asm) SHA1_ASM=YES ;;
|
|
255
|
0
|
256 --with-zlib=*) ZLIB="$value" ;;
|
|
257 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
|
|
258 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
|
|
259
|
18
|
260 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
|
236
|
261 --test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
|
18
|
262 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
|
|
263 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
|
22
|
264 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
|
0
|
265
|
|
266 *)
|
|
267 echo "$0: error: invalid option \"$option\""
|
|
268 exit 1
|
|
269 ;;
|
|
270 esac
|
|
271 done
|
|
272
|
|
273
|
482
|
274 NGX_CONFIGURE="$opt"
|
|
275
|
|
276
|
0
|
277 if [ $help = yes ]; then
|
4
|
278
|
|
279 cat << END
|
|
280
|
28
|
281 --help this message
|
|
282
|
|
283 --prefix=PATH set the installation prefix
|
|
284 --sbin-path=PATH set path to the nginx binary file
|
|
285 --conf-path=PATH set path to the nginx.conf file
|
|
286 --error-log-path=PATH set path to the error log
|
|
287 --pid-path=PATH set path to nginx.pid file
|
160
|
288 --lock-path=PATH set path to nginx.lock file
|
28
|
289
|
|
290 --user=USER set non-privilege user
|
|
291 for the worker processes
|
|
292 --group=GROUP set non-privilege group
|
|
293 for the worker processes
|
|
294
|
|
295 --builddir=DIR set the build directory
|
0
|
296
|
28
|
297 --with-rtsig_module enable rtsig module
|
|
298 --with-select_module enable select module
|
|
299 --without-select_module disable select module
|
|
300 --with-poll_module enable poll module
|
|
301 --without-poll_module disable poll module
|
4
|
302
|
448
|
303 --with-ipv6 enable ipv6 support
|
|
304
|
28
|
305 --with-http_ssl_module enable ngx_http_ssl_module
|
130
|
306 --with-http_realip_module enable ngx_http_realip_module
|
184
|
307 --with-http_addition_module enable ngx_http_addition_module
|
392
|
308 --with-http_xslt_module enable ngx_http_xslt_module
|
296
|
309 --with-http_sub_module enable ngx_http_sub_module
|
184
|
310 --with-http_dav_module enable ngx_http_dav_module
|
244
|
311 --with-http_flv_module enable ngx_http_flv_module
|
358
|
312 --with-http_gzip_static_module enable ngx_http_gzip_static_module
|
406
|
313 --with-http_random_index_module enable ngx_http_random_index_module
|
412
|
314 --with-http_secure_link_module enable ngx_http_secure_link_module
|
300
|
315 --with-http_stub_status_module enable ngx_http_stub_status_module
|
184
|
316
|
28
|
317 --without-http_charset_module disable ngx_http_charset_module
|
|
318 --without-http_gzip_module disable ngx_http_gzip_module
|
50
|
319 --without-http_ssi_module disable ngx_http_ssi_module
|
28
|
320 --without-http_userid_module disable ngx_http_userid_module
|
|
321 --without-http_access_module disable ngx_http_access_module
|
52
|
322 --without-http_auth_basic_module disable ngx_http_auth_basic_module
|
28
|
323 --without-http_autoindex_module disable ngx_http_autoindex_module
|
34
|
324 --without-http_geo_module disable ngx_http_geo_module
|
238
|
325 --without-http_map_module disable ngx_http_map_module
|
130
|
326 --without-http_referer_module disable ngx_http_referer_module
|
28
|
327 --without-http_rewrite_module disable ngx_http_rewrite_module
|
|
328 --without-http_proxy_module disable ngx_http_proxy_module
|
|
329 --without-http_fastcgi_module disable ngx_http_fastcgi_module
|
130
|
330 --without-http_memcached_module disable ngx_http_memcached_module
|
272
|
331 --without-http_limit_zone_module disable ngx_http_limit_zone_module
|
416
|
332 --without-http_limit_req_module disable ngx_http_limit_req_module
|
130
|
333 --without-http_empty_gif_module disable ngx_http_empty_gif_module
|
238
|
334 --without-http_browser_module disable ngx_http_browser_module
|
260
|
335 --without-http_upstream_ip_hash_module
|
|
336 disable ngx_http_upstream_ip_hash_module
|
0
|
337
|
148
|
338 --with-http_perl_module enable ngx_http_perl_module
|
|
339 --with-perl_modules_path=PATH set path to the perl modules
|
|
340 --with-perl=PATH set path to the perl binary
|
|
341
|
28
|
342 --http-log-path=PATH set path to the http access log
|
|
343 --http-client-body-temp-path=PATH set path to the http client request body
|
184
|
344 temporary files
|
|
345 --http-proxy-temp-path=PATH set path to the http proxy temporary files
|
28
|
346 --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
|
184
|
347 files
|
28
|
348
|
78
|
349 --without-http disable HTTP server
|
464
|
350 --without-http-cache disable HTTP cache
|
78
|
351
|
338
|
352 --with-mail enable POP3/IMAP4/SMTP proxy module
|
290
|
353 --with-mail_ssl_module enable ngx_mail_ssl_module
|
338
|
354 --without-mail_pop3_module disable ngx_mail_pop3_module
|
|
355 --without-mail_imap_module disable ngx_mail_imap_module
|
|
356 --without-mail_smtp_module disable ngx_mail_smtp_module
|
78
|
357
|
370
|
358 --with-google_perftools_module enable ngx_google_perftools_module
|
394
|
359 --with-cpp_test_module enable ngx_cpp_test_module
|
370
|
360
|
300
|
361 --add-module=PATH enable an external module
|
|
362
|
28
|
363 --with-cc=PATH set path to C compiler
|
|
364 --with-cpp=PATH set path to C preprocessor
|
|
365 --with-cc-opt=OPTIONS set additional options for C compiler
|
|
366 --with-ld-opt=OPTIONS set additional options for linker
|
|
367 --with-cpu-opt=CPU build for specified CPU, the valid values:
|
162
|
368 pentium, pentiumpro, pentium3, pentium4,
|
|
369 athlon, opteron, sparc32, sparc64, ppc64
|
0
|
370
|
464
|
371 --without-pcre disable PCRE library usage
|
|
372 --with-pcre force PCRE library usage
|
28
|
373 --with-pcre=DIR set path to PCRE library sources
|
|
374 --with-pcre-opt=OPTIONS set additional options for PCRE building
|
|
375
|
|
376 --with-md5=DIR set path to md5 library sources
|
|
377 --with-md5-opt=OPTIONS set additional options for md5 building
|
|
378 --with-md5-asm use md5 assembler sources
|
0
|
379
|
202
|
380 --with-sha1=DIR set path to sha1 library sources
|
|
381 --with-sha1-opt=OPTIONS set additional options for sha1 building
|
|
382 --with-sha1-asm use sha1 assembler sources
|
|
383
|
28
|
384 --with-zlib=DIR set path to zlib library sources
|
|
385 --with-zlib-opt=OPTIONS set additional options for zlib building
|
|
386 --with-zlib-asm=CPU use zlib assembler sources optimized
|
|
387 for specified CPU, the valid values:
|
|
388 pentium, pentiumpro
|
|
389
|
|
390 --with-openssl=DIR set path to OpenSSL library sources
|
50
|
391 --with-openssl-opt=OPTIONS set additional options for OpenSSL building
|
28
|
392
|
|
393 --with-debug enable the debugging logging
|
4
|
394
|
|
395 END
|
0
|
396
|
|
397 exit 1
|
|
398 fi
|
|
399
|
|
400
|
|
401 if [ $HTTP = NO ]; then
|
|
402 HTTP_CHARSET=NO
|
|
403 HTTP_GZIP=NO
|
|
404 HTTP_SSI=NO
|
|
405 HTTP_USERID=NO
|
|
406 HTTP_ACCESS=NO
|
|
407 HTTP_STATUS=NO
|
|
408 HTTP_REWRITE=NO
|
|
409 HTTP_PROXY=NO
|
28
|
410 HTTP_FASTCGI=NO
|
0
|
411 fi
|
|
412
|
|
413
|
18
|
414 if [ ".$NGX_PLATFORM" = ".win32" ]; then
|
10
|
415 NGX_WINE=$WINE
|
0
|
416 fi
|
|
417
|
|
418
|
482
|
419 NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
|
326
|
420 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
|
482
|
421 NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
|
|
422 NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
|
0
|
423
|
482
|
424 if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
|
|
425 NGX_ERROR_LOG_PATH=
|
|
426 else
|
|
427 NGX_ERROR_LOG_PATH=${NGX_ERROR_LOG_PATH:-logs/error.log}
|
|
428 fi
|
28
|
429
|
482
|
430 NGX_HTTP_LOG_PATH=${NGX_HTTP_LOG_PATH:-logs/access.log}
|
|
431 NGX_HTTP_CLIENT_TEMP_PATH=${NGX_HTTP_CLIENT_TEMP_PATH:-client_body_temp}
|
|
432 NGX_HTTP_PROXY_TEMP_PATH=${NGX_HTTP_PROXY_TEMP_PATH:-proxy_temp}
|
|
433 NGX_HTTP_FASTCGI_TEMP_PATH=${NGX_HTTP_FASTCGI_TEMP_PATH:-fastcgi_temp}
|
148
|
434
|
|
435 case ".$NGX_PERL_MODULES" in
|
|
436 ./*)
|
|
437 ;;
|
|
438
|
|
439 .)
|
|
440 ;;
|
|
441
|
|
442 *)
|
|
443 NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES
|
|
444 ;;
|
|
445 esac
|