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