1
2# Copyright (C) Igor Sysoev
3# Copyright (C) Nginx, Inc.
4
5
6help=no
7
8NGX_PREFIX=
9NGX_SBIN_PATH=
10NGX_MODULES_PATH=
11NGX_CONF_PREFIX=
12NGX_CONF_PATH=
13NGX_ERROR_LOG_PATH=
14NGX_PID_PATH=
15NGX_LOCK_PATH=
16NGX_USER=
17NGX_GROUP=
18NGX_BUILD=
19
20CC=${CC:-cc}
21CPP=
22NGX_OBJS=objs
23
24NGX_DEBUG=NO
25NGX_CC_OPT=
26NGX_LD_OPT=
27CPU=NO
28
29NGX_RPATH=NO
30
31NGX_TEST_BUILD_DEVPOLL=NO
32NGX_TEST_BUILD_EVENTPORT=NO
33NGX_TEST_BUILD_EPOLL=NO
34NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
35
36NGX_PLATFORM=
37NGX_WINE=
38
39EVENT_FOUND=NO
40
41EVENT_SELECT=NO
42EVENT_POLL=NO
43
44USE_THREADS=NO
45
46NGX_FILE_AIO=NO
47
48HTTP=YES
49
50NGX_HTTP_LOG_PATH=
51NGX_HTTP_CLIENT_TEMP_PATH=
52NGX_HTTP_PROXY_TEMP_PATH=
53NGX_HTTP_FASTCGI_TEMP_PATH=
54NGX_HTTP_UWSGI_TEMP_PATH=
55NGX_HTTP_SCGI_TEMP_PATH=
56
57HTTP_CACHE=YES
58HTTP_CHARSET=YES
59HTTP_GZIP=YES
60HTTP_SSL=NO
61HTTP_V2=NO
62HTTP_SSI=YES
63HTTP_REALIP=NO
64HTTP_XSLT=NO
65HTTP_IMAGE_FILTER=NO
66HTTP_SUB=NO
67HTTP_ADDITION=NO
68HTTP_DAV=NO
69HTTP_ACCESS=YES
70HTTP_AUTH_BASIC=YES
71HTTP_AUTH_REQUEST=NO
72HTTP_MIRROR=YES
73HTTP_USERID=YES
74HTTP_SLICE=NO
75HTTP_AUTOINDEX=YES
76HTTP_RANDOM_INDEX=NO
77HTTP_STATUS=NO
78HTTP_GEO=YES
79HTTP_GEOIP=NO
80HTTP_MAP=YES
81HTTP_SPLIT_CLIENTS=YES
82HTTP_REFERER=YES
83HTTP_REWRITE=YES
84HTTP_PROXY=YES
85HTTP_FASTCGI=YES
86HTTP_UWSGI=YES
87HTTP_SCGI=YES
88HTTP_GRPC=YES
89HTTP_PERL=NO
90HTTP_MEMCACHED=YES
91HTTP_LIMIT_CONN=YES
92HTTP_LIMIT_REQ=YES
93HTTP_EMPTY_GIF=YES
94HTTP_BROWSER=YES
95HTTP_SECURE_LINK=NO
96HTTP_DEGRADATION=NO
97HTTP_FLV=NO
98HTTP_MP4=NO
99HTTP_GUNZIP=NO
100HTTP_GZIP_STATIC=NO
101HTTP_UPSTREAM_HASH=YES
102HTTP_UPSTREAM_IP_HASH=YES
103HTTP_UPSTREAM_LEAST_CONN=YES
104HTTP_UPSTREAM_RANDOM=YES
105HTTP_UPSTREAM_KEEPALIVE=YES
106HTTP_UPSTREAM_ZONE=YES
107
108# STUB
109HTTP_STUB_STATUS=NO
110
111MAIL=NO
112MAIL_SSL=NO
113MAIL_POP3=YES
114MAIL_IMAP=YES
115MAIL_SMTP=YES
116
117STREAM=NO
118STREAM_SSL=NO
119STREAM_REALIP=NO
120STREAM_LIMIT_CONN=YES
121STREAM_ACCESS=YES
122STREAM_GEO=YES
123STREAM_GEOIP=NO
124STREAM_MAP=YES
125STREAM_SPLIT_CLIENTS=YES
126STREAM_RETURN=YES
127STREAM_SET=YES
128STREAM_UPSTREAM_HASH=YES
129STREAM_UPSTREAM_LEAST_CONN=YES
130STREAM_UPSTREAM_RANDOM=YES
131STREAM_UPSTREAM_ZONE=YES
132STREAM_SSL_PREREAD=NO
133
134DYNAMIC_MODULES=
135DYNAMIC_MODULES_SRCS=
136
137NGX_ADDONS=
138NGX_ADDON_SRCS=
139NGX_ADDON_DEPS=
140DYNAMIC_ADDONS=
141
142NGX_COMPAT=NO
143
144USE_PCRE=NO
145PCRE=NONE
146PCRE_OPT=
147PCRE_CONF_OPT=
148PCRE_JIT=NO
149PCRE2=YES
150
151USE_OPENSSL=NO
152OPENSSL=NONE
153
154USE_ZLIB=NO
155ZLIB=NONE
156ZLIB_OPT=
157ZLIB_ASM=NO
158
159USE_PERL=NO
160NGX_PERL=perl
161
162USE_LIBXSLT=NO
163USE_LIBGD=NO
164USE_GEOIP=NO
165
166NGX_GOOGLE_PERFTOOLS=NO
167NGX_CPP_TEST=NO
168
169NGX_LIBATOMIC=NO
170
171NGX_CPU_CACHE_LINE=
172
173NGX_POST_CONF_MSG=
174
175opt=
176
177for option
178do
179    opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
180
181    case "$option" in
182        -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
183           *) value="" ;;
184    esac
185
186    case "$option" in
187        --help)                          help=yes                   ;;
188
189        --prefix=)                       NGX_PREFIX="!"             ;;
190        --prefix=*)                      NGX_PREFIX="$value"        ;;
191        --sbin-path=*)                   NGX_SBIN_PATH="$value"     ;;
192        --modules-path=*)                NGX_MODULES_PATH="$value"  ;;
193        --conf-path=*)                   NGX_CONF_PATH="$value"     ;;
194        --error-log-path=*)              NGX_ERROR_LOG_PATH="$value";;
195        --pid-path=*)                    NGX_PID_PATH="$value"      ;;
196        --lock-path=*)                   NGX_LOCK_PATH="$value"     ;;
197        --user=*)                        NGX_USER="$value"          ;;
198        --group=*)                       NGX_GROUP="$value"         ;;
199
200        --crossbuild=*)                  NGX_PLATFORM="$value"      ;;
201
202        --build=*)                       NGX_BUILD="$value"         ;;
203        --builddir=*)                    NGX_OBJS="$value"          ;;
204
205        --with-select_module)            EVENT_SELECT=YES           ;;
206        --without-select_module)         EVENT_SELECT=NONE          ;;
207        --with-poll_module)              EVENT_POLL=YES             ;;
208        --without-poll_module)           EVENT_POLL=NONE            ;;
209
210        --with-threads)                  USE_THREADS=YES            ;;
211
212        --with-file-aio)                 NGX_FILE_AIO=YES           ;;
213
214        --with-ipv6)
215            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
216$0: warning: the \"--with-ipv6\" option is deprecated"
217        ;;
218
219        --without-http)                  HTTP=NO                    ;;
220        --without-http-cache)            HTTP_CACHE=NO              ;;
221
222        --http-log-path=*)               NGX_HTTP_LOG_PATH="$value" ;;
223        --http-client-body-temp-path=*)  NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
224        --http-proxy-temp-path=*)        NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
225        --http-fastcgi-temp-path=*)      NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
226        --http-uwsgi-temp-path=*)        NGX_HTTP_UWSGI_TEMP_PATH="$value" ;;
227        --http-scgi-temp-path=*)         NGX_HTTP_SCGI_TEMP_PATH="$value" ;;
228
229        --with-http_ssl_module)          HTTP_SSL=YES               ;;
230        --with-http_v2_module)           HTTP_V2=YES                ;;
231        --with-http_realip_module)       HTTP_REALIP=YES            ;;
232        --with-http_addition_module)     HTTP_ADDITION=YES          ;;
233        --with-http_xslt_module)         HTTP_XSLT=YES              ;;
234        --with-http_xslt_module=dynamic) HTTP_XSLT=DYNAMIC          ;;
235        --with-http_image_filter_module) HTTP_IMAGE_FILTER=YES      ;;
236        --with-http_image_filter_module=dynamic)
237                                         HTTP_IMAGE_FILTER=DYNAMIC  ;;
238        --with-http_geoip_module)        HTTP_GEOIP=YES             ;;
239        --with-http_geoip_module=dynamic)
240                                         HTTP_GEOIP=DYNAMIC         ;;
241        --with-http_sub_module)          HTTP_SUB=YES               ;;
242        --with-http_dav_module)          HTTP_DAV=YES               ;;
243        --with-http_flv_module)          HTTP_FLV=YES               ;;
244        --with-http_mp4_module)          HTTP_MP4=YES               ;;
245        --with-http_gunzip_module)       HTTP_GUNZIP=YES            ;;
246        --with-http_gzip_static_module)  HTTP_GZIP_STATIC=YES       ;;
247        --with-http_auth_request_module) HTTP_AUTH_REQUEST=YES      ;;
248        --with-http_random_index_module) HTTP_RANDOM_INDEX=YES      ;;
249        --with-http_secure_link_module)  HTTP_SECURE_LINK=YES       ;;
250        --with-http_degradation_module)  HTTP_DEGRADATION=YES       ;;
251        --with-http_slice_module)        HTTP_SLICE=YES             ;;
252
253        --without-http_charset_module)   HTTP_CHARSET=NO            ;;
254        --without-http_gzip_module)      HTTP_GZIP=NO               ;;
255        --without-http_ssi_module)       HTTP_SSI=NO                ;;
256        --without-http_userid_module)    HTTP_USERID=NO             ;;
257        --without-http_access_module)    HTTP_ACCESS=NO             ;;
258        --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO        ;;
259        --without-http_mirror_module)    HTTP_MIRROR=NO             ;;
260        --without-http_autoindex_module) HTTP_AUTOINDEX=NO          ;;
261        --without-http_status_module)    HTTP_STATUS=NO             ;;
262        --without-http_geo_module)       HTTP_GEO=NO                ;;
263        --without-http_map_module)       HTTP_MAP=NO                ;;
264        --without-http_split_clients_module) HTTP_SPLIT_CLIENTS=NO  ;;
265        --without-http_referer_module)   HTTP_REFERER=NO            ;;
266        --without-http_rewrite_module)   HTTP_REWRITE=NO            ;;
267        --without-http_proxy_module)     HTTP_PROXY=NO              ;;
268        --without-http_fastcgi_module)   HTTP_FASTCGI=NO            ;;
269        --without-http_uwsgi_module)     HTTP_UWSGI=NO              ;;
270        --without-http_scgi_module)      HTTP_SCGI=NO               ;;
271        --without-http_grpc_module)      HTTP_GRPC=NO               ;;
272        --without-http_memcached_module) HTTP_MEMCACHED=NO          ;;
273        --without-http_limit_conn_module) HTTP_LIMIT_CONN=NO        ;;
274        --without-http_limit_req_module) HTTP_LIMIT_REQ=NO         ;;
275        --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO          ;;
276        --without-http_browser_module)   HTTP_BROWSER=NO            ;;
277        --without-http_upstream_hash_module) HTTP_UPSTREAM_HASH=NO  ;;
278        --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
279        --without-http_upstream_least_conn_module)
280                                         HTTP_UPSTREAM_LEAST_CONN=NO ;;
281        --without-http_upstream_random_module)
282                                         HTTP_UPSTREAM_RANDOM=NO    ;;
283        --without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
284        --without-http_upstream_zone_module) HTTP_UPSTREAM_ZONE=NO  ;;
285
286        --with-http_perl_module)         HTTP_PERL=YES              ;;
287        --with-http_perl_module=dynamic) HTTP_PERL=DYNAMIC          ;;
288        --with-perl_modules_path=*)      NGX_PERL_MODULES="$value"  ;;
289        --with-perl=*)                   NGX_PERL="$value"          ;;
290
291        # STUB
292        --with-http_stub_status_module)  HTTP_STUB_STATUS=YES       ;;
293
294        --with-mail)                     MAIL=YES                   ;;
295        --with-mail=dynamic)             MAIL=DYNAMIC               ;;
296        --with-mail_ssl_module)          MAIL_SSL=YES               ;;
297        # STUB
298        --with-imap)
299            MAIL=YES
300            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
301$0: warning: the \"--with-imap\" option is deprecated, \
302use the \"--with-mail\" option instead"
303        ;;
304        --with-imap_ssl_module)
305            MAIL_SSL=YES
306            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
307$0: warning: the \"--with-imap_ssl_module\" option is deprecated, \
308use the \"--with-mail_ssl_module\" option instead"
309        ;;
310        --without-mail_pop3_module)      MAIL_POP3=NO               ;;
311        --without-mail_imap_module)      MAIL_IMAP=NO               ;;
312        --without-mail_smtp_module)      MAIL_SMTP=NO               ;;
313
314        --with-stream)                   STREAM=YES                 ;;
315        --with-stream=dynamic)           STREAM=DYNAMIC             ;;
316        --with-stream_ssl_module)        STREAM_SSL=YES             ;;
317        --with-stream_realip_module)     STREAM_REALIP=YES          ;;
318        --with-stream_geoip_module)      STREAM_GEOIP=YES           ;;
319        --with-stream_geoip_module=dynamic)
320                                         STREAM_GEOIP=DYNAMIC       ;;
321        --with-stream_ssl_preread_module)
322                                         STREAM_SSL_PREREAD=YES     ;;
323        --without-stream_limit_conn_module)
324                                         STREAM_LIMIT_CONN=NO       ;;
325        --without-stream_access_module)  STREAM_ACCESS=NO           ;;
326        --without-stream_geo_module)     STREAM_GEO=NO              ;;
327        --without-stream_map_module)     STREAM_MAP=NO              ;;
328        --without-stream_split_clients_module)
329                                         STREAM_SPLIT_CLIENTS=NO    ;;
330        --without-stream_return_module)  STREAM_RETURN=NO           ;;
331        --without-stream_set_module)     STREAM_SET=NO              ;;
332        --without-stream_upstream_hash_module)
333                                         STREAM_UPSTREAM_HASH=NO    ;;
334        --without-stream_upstream_least_conn_module)
335                                         STREAM_UPSTREAM_LEAST_CONN=NO ;;
336        --without-stream_upstream_random_module)
337                                         STREAM_UPSTREAM_RANDOM=NO  ;;
338        --without-stream_upstream_zone_module)
339                                         STREAM_UPSTREAM_ZONE=NO    ;;
340
341        --with-google_perftools_module)  NGX_GOOGLE_PERFTOOLS=YES   ;;
342        --with-cpp_test_module)          NGX_CPP_TEST=YES           ;;
343
344        --add-module=*)                  NGX_ADDONS="$NGX_ADDONS $value" ;;
345        --add-dynamic-module=*)          DYNAMIC_ADDONS="$DYNAMIC_ADDONS $value" ;;
346
347        --with-compat)                   NGX_COMPAT=YES             ;;
348
349        --with-cc=*)                     CC="$value"                ;;
350        --with-cpp=*)                    CPP="$value"               ;;
351        --with-cc-opt=*)                 NGX_CC_OPT="$value"        ;;
352        --with-ld-opt=*)                 NGX_LD_OPT="$value"        ;;
353        --with-cpu-opt=*)                CPU="$value"               ;;
354        --with-debug)                    NGX_DEBUG=YES              ;;
355
356        --without-pcre)                  USE_PCRE=DISABLED          ;;
357        --with-pcre)                     USE_PCRE=YES               ;;
358        --with-pcre=*)                   PCRE="$value"              ;;
359        --with-pcre-opt=*)               PCRE_OPT="$value"          ;;
360        --with-pcre-jit)                 PCRE_JIT=YES               ;;
361        --without-pcre2)                 PCRE2=DISABLED             ;;
362
363        --with-openssl=*)                OPENSSL="$value"           ;;
364        --with-openssl-opt=*)            OPENSSL_OPT="$value"       ;;
365
366        --with-md5=*)
367            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
368$0: warning: the \"--with-md5\" option is deprecated"
369        ;;
370        --with-md5-opt=*)
371            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
372$0: warning: the \"--with-md5-opt\" option is deprecated"
373        ;;
374        --with-md5-asm)
375            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
376$0: warning: the \"--with-md5-asm\" option is deprecated"
377        ;;
378
379        --with-sha1=*)
380            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
381$0: warning: the \"--with-sha1\" option is deprecated"
382        ;;
383        --with-sha1-opt=*)
384            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
385$0: warning: the \"--with-sha1-opt\" option is deprecated"
386        ;;
387        --with-sha1-asm)
388            NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
389$0: warning: the \"--with-sha1-asm\" option is deprecated"
390        ;;
391
392        --with-zlib=*)                   ZLIB="$value"              ;;
393        --with-zlib-opt=*)               ZLIB_OPT="$value"          ;;
394        --with-zlib-asm=*)               ZLIB_ASM="$value"          ;;
395
396        --with-libatomic)                NGX_LIBATOMIC=YES          ;;
397        --with-libatomic=*)              NGX_LIBATOMIC="$value"     ;;
398
399        --test-build-devpoll)            NGX_TEST_BUILD_DEVPOLL=YES ;;
400        --test-build-eventport)          NGX_TEST_BUILD_EVENTPORT=YES ;;
401        --test-build-epoll)              NGX_TEST_BUILD_EPOLL=YES   ;;
402        --test-build-solaris-sendfilev)  NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
403
404        *)
405            echo "$0: error: invalid option \"$option\""
406            exit 1
407        ;;
408    esac
409done
410
411
412NGX_CONFIGURE="$opt"
413
414
415if [ $help = yes ]; then
416
417cat << END
418
419  --help                             print this message
420
421  --prefix=PATH                      set installation prefix
422  --sbin-path=PATH                   set nginx binary pathname
423  --modules-path=PATH                set modules path
424  --conf-path=PATH                   set nginx.conf pathname
425  --error-log-path=PATH              set error log pathname
426  --pid-path=PATH                    set nginx.pid pathname
427  --lock-path=PATH                   set nginx.lock pathname
428
429  --user=USER                        set non-privileged user for
430                                     worker processes
431  --group=GROUP                      set non-privileged group for
432                                     worker processes
433
434  --build=NAME                       set build name
435  --builddir=DIR                     set build directory
436
437  --with-select_module               enable select module
438  --without-select_module            disable select module
439  --with-poll_module                 enable poll module
440  --without-poll_module              disable poll module
441
442  --with-threads                     enable thread pool support
443
444  --with-file-aio                    enable file AIO support
445
446  --with-http_ssl_module             enable ngx_http_ssl_module
447  --with-http_v2_module              enable ngx_http_v2_module
448  --with-http_realip_module          enable ngx_http_realip_module
449  --with-http_addition_module        enable ngx_http_addition_module
450  --with-http_xslt_module            enable ngx_http_xslt_module
451  --with-http_xslt_module=dynamic    enable dynamic ngx_http_xslt_module
452  --with-http_image_filter_module    enable ngx_http_image_filter_module
453  --with-http_image_filter_module=dynamic
454                                     enable dynamic ngx_http_image_filter_module
455  --with-http_geoip_module           enable ngx_http_geoip_module
456  --with-http_geoip_module=dynamic   enable dynamic ngx_http_geoip_module
457  --with-http_sub_module             enable ngx_http_sub_module
458  --with-http_dav_module             enable ngx_http_dav_module
459  --with-http_flv_module             enable ngx_http_flv_module
460  --with-http_mp4_module             enable ngx_http_mp4_module
461  --with-http_gunzip_module          enable ngx_http_gunzip_module
462  --with-http_gzip_static_module     enable ngx_http_gzip_static_module
463  --with-http_auth_request_module    enable ngx_http_auth_request_module
464  --with-http_random_index_module    enable ngx_http_random_index_module
465  --with-http_secure_link_module     enable ngx_http_secure_link_module
466  --with-http_degradation_module     enable ngx_http_degradation_module
467  --with-http_slice_module           enable ngx_http_slice_module
468  --with-http_stub_status_module     enable ngx_http_stub_status_module
469
470  --without-http_charset_module      disable ngx_http_charset_module
471  --without-http_gzip_module         disable ngx_http_gzip_module
472  --without-http_ssi_module          disable ngx_http_ssi_module
473  --without-http_userid_module       disable ngx_http_userid_module
474  --without-http_access_module       disable ngx_http_access_module
475  --without-http_auth_basic_module   disable ngx_http_auth_basic_module
476  --without-http_mirror_module       disable ngx_http_mirror_module
477  --without-http_autoindex_module    disable ngx_http_autoindex_module
478  --without-http_geo_module          disable ngx_http_geo_module
479  --without-http_map_module          disable ngx_http_map_module
480  --without-http_split_clients_module disable ngx_http_split_clients_module
481  --without-http_referer_module      disable ngx_http_referer_module
482  --without-http_rewrite_module      disable ngx_http_rewrite_module
483  --without-http_proxy_module        disable ngx_http_proxy_module
484  --without-http_fastcgi_module      disable ngx_http_fastcgi_module
485  --without-http_uwsgi_module        disable ngx_http_uwsgi_module
486  --without-http_scgi_module         disable ngx_http_scgi_module
487  --without-http_grpc_module         disable ngx_http_grpc_module
488  --without-http_memcached_module    disable ngx_http_memcached_module
489  --without-http_limit_conn_module   disable ngx_http_limit_conn_module
490  --without-http_limit_req_module    disable ngx_http_limit_req_module
491  --without-http_empty_gif_module    disable ngx_http_empty_gif_module
492  --without-http_browser_module      disable ngx_http_browser_module
493  --without-http_upstream_hash_module
494                                     disable ngx_http_upstream_hash_module
495  --without-http_upstream_ip_hash_module
496                                     disable ngx_http_upstream_ip_hash_module
497  --without-http_upstream_least_conn_module
498                                     disable ngx_http_upstream_least_conn_module
499  --without-http_upstream_random_module
500                                     disable ngx_http_upstream_random_module
501  --without-http_upstream_keepalive_module
502                                     disable ngx_http_upstream_keepalive_module
503  --without-http_upstream_zone_module
504                                     disable ngx_http_upstream_zone_module
505
506  --with-http_perl_module            enable ngx_http_perl_module
507  --with-http_perl_module=dynamic    enable dynamic ngx_http_perl_module
508  --with-perl_modules_path=PATH      set Perl modules path
509  --with-perl=PATH                   set perl binary pathname
510
511  --http-log-path=PATH               set http access log pathname
512  --http-client-body-temp-path=PATH  set path to store
513                                     http client request body temporary files
514  --http-proxy-temp-path=PATH        set path to store
515                                     http proxy temporary files
516  --http-fastcgi-temp-path=PATH      set path to store
517                                     http fastcgi temporary files
518  --http-uwsgi-temp-path=PATH        set path to store
519                                     http uwsgi temporary files
520  --http-scgi-temp-path=PATH         set path to store
521                                     http scgi temporary files
522
523  --without-http                     disable HTTP server
524  --without-http-cache               disable HTTP cache
525
526  --with-mail                        enable POP3/IMAP4/SMTP proxy module
527  --with-mail=dynamic                enable dynamic POP3/IMAP4/SMTP proxy module
528  --with-mail_ssl_module             enable ngx_mail_ssl_module
529  --without-mail_pop3_module         disable ngx_mail_pop3_module
530  --without-mail_imap_module         disable ngx_mail_imap_module
531  --without-mail_smtp_module         disable ngx_mail_smtp_module
532
533  --with-stream                      enable TCP/UDP proxy module
534  --with-stream=dynamic              enable dynamic TCP/UDP proxy module
535  --with-stream_ssl_module           enable ngx_stream_ssl_module
536  --with-stream_realip_module        enable ngx_stream_realip_module
537  --with-stream_geoip_module         enable ngx_stream_geoip_module
538  --with-stream_geoip_module=dynamic enable dynamic ngx_stream_geoip_module
539  --with-stream_ssl_preread_module   enable ngx_stream_ssl_preread_module
540  --without-stream_limit_conn_module disable ngx_stream_limit_conn_module
541  --without-stream_access_module     disable ngx_stream_access_module
542  --without-stream_geo_module        disable ngx_stream_geo_module
543  --without-stream_map_module        disable ngx_stream_map_module
544  --without-stream_split_clients_module
545                                     disable ngx_stream_split_clients_module
546  --without-stream_return_module     disable ngx_stream_return_module
547  --without-stream_set_module        disable ngx_stream_set_module
548  --without-stream_upstream_hash_module
549                                     disable ngx_stream_upstream_hash_module
550  --without-stream_upstream_least_conn_module
551                                     disable ngx_stream_upstream_least_conn_module
552  --without-stream_upstream_random_module
553                                     disable ngx_stream_upstream_random_module
554  --without-stream_upstream_zone_module
555                                     disable ngx_stream_upstream_zone_module
556
557  --with-google_perftools_module     enable ngx_google_perftools_module
558  --with-cpp_test_module             enable ngx_cpp_test_module
559
560  --add-module=PATH                  enable external module
561  --add-dynamic-module=PATH          enable dynamic external module
562
563  --with-compat                      dynamic modules compatibility
564
565  --with-cc=PATH                     set C compiler pathname
566  --with-cpp=PATH                    set C preprocessor pathname
567  --with-cc-opt=OPTIONS              set additional C compiler options
568  --with-ld-opt=OPTIONS              set additional linker options
569  --with-cpu-opt=CPU                 build for the specified CPU, valid values:
570                                     pentium, pentiumpro, pentium3, pentium4,
571                                     athlon, opteron, sparc32, sparc64, ppc64
572
573  --without-pcre                     disable PCRE library usage
574  --with-pcre                        force PCRE library usage
575  --with-pcre=DIR                    set path to PCRE library sources
576  --with-pcre-opt=OPTIONS            set additional build options for PCRE
577  --with-pcre-jit                    build PCRE with JIT compilation support
578  --without-pcre2                    do not use PCRE2 library
579
580  --with-zlib=DIR                    set path to zlib library sources
581  --with-zlib-opt=OPTIONS            set additional build options for zlib
582  --with-zlib-asm=CPU                use zlib assembler sources optimized
583                                     for the specified CPU, valid values:
584                                     pentium, pentiumpro
585
586  --with-libatomic                   force libatomic_ops library usage
587  --with-libatomic=DIR               set path to libatomic_ops library sources
588
589  --with-openssl=DIR                 set path to OpenSSL library sources
590  --with-openssl-opt=OPTIONS         set additional build options for OpenSSL
591
592  --with-debug                       enable debug logging
593
594END
595
596    exit 1
597fi
598
599
600if [ ".$NGX_PLATFORM" = ".win32" ]; then
601    NGX_WINE=$WINE
602fi
603
604
605NGX_SBIN_PATH=${NGX_SBIN_PATH:-sbin/nginx}
606NGX_MODULES_PATH=${NGX_MODULES_PATH:-modules}
607NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
608NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
609NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
610NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
611
612if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
613    NGX_ERROR_LOG_PATH=
614else
615    NGX_ERROR_LOG_PATH=${NGX_ERROR_LOG_PATH:-logs/error.log}
616fi
617
618NGX_HTTP_LOG_PATH=${NGX_HTTP_LOG_PATH:-logs/access.log}
619NGX_HTTP_CLIENT_TEMP_PATH=${NGX_HTTP_CLIENT_TEMP_PATH:-client_body_temp}
620NGX_HTTP_PROXY_TEMP_PATH=${NGX_HTTP_PROXY_TEMP_PATH:-proxy_temp}
621NGX_HTTP_FASTCGI_TEMP_PATH=${NGX_HTTP_FASTCGI_TEMP_PATH:-fastcgi_temp}
622NGX_HTTP_UWSGI_TEMP_PATH=${NGX_HTTP_UWSGI_TEMP_PATH:-uwsgi_temp}
623NGX_HTTP_SCGI_TEMP_PATH=${NGX_HTTP_SCGI_TEMP_PATH:-scgi_temp}
624
625case ".$NGX_PERL_MODULES" in
626    ./*)
627    ;;
628
629    .)
630    ;;
631
632    *)
633        NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES
634    ;;
635esac
636