2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
29 NGX_TEST_BUILD_DEVPOLL=NO
30 NGX_TEST_BUILD_EVENTPORT=NO
31 NGX_TEST_BUILD_EPOLL=NO
32 NGX_TEST_BUILD_RTSIG=NO
33 NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
53 NGX_HTTP_CLIENT_TEMP_PATH=
54 NGX_HTTP_PROXY_TEMP_PATH=
55 NGX_HTTP_FASTCGI_TEMP_PATH=
56 NGX_HTTP_UWSGI_TEMP_PATH=
57 NGX_HTTP_SCGI_TEMP_PATH=
81 HTTP_SPLIT_CLIENTS=YES
100 HTTP_UPSTREAM_IP_HASH=YES
101 HTTP_UPSTREAM_LEAST_CONN=YES
102 HTTP_UPSTREAM_KEEPALIVE=YES
145 NGX_GOOGLE_PERFTOOLS=NO
158 opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
161 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
168 --prefix=) NGX_PREFIX="!" ;;
169 --prefix=*) NGX_PREFIX="$value" ;;
170 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
171 --conf-path=*) NGX_CONF_PATH="$value" ;;
172 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
173 --pid-path=*) NGX_PID_PATH="$value" ;;
174 --lock-path=*) NGX_LOCK_PATH="$value" ;;
175 --user=*) NGX_USER="$value" ;;
176 --group=*) NGX_GROUP="$value" ;;
178 --crossbuild=*) NGX_PLATFORM="$value" ;;
180 --builddir=*) NGX_OBJS="$value" ;;
182 --with-rtsig_module) EVENT_RTSIG=YES ;;
183 --with-select_module) EVENT_SELECT=YES ;;
184 --without-select_module) EVENT_SELECT=NONE ;;
185 --with-poll_module) EVENT_POLL=YES ;;
186 --without-poll_module) EVENT_POLL=NONE ;;
187 --with-aio_module) EVENT_AIO=YES ;;
189 #--with-threads=*) USE_THREADS="$value" ;;
190 #--with-threads) USE_THREADS="pthreads" ;;
192 --with-file-aio) NGX_FILE_AIO=YES ;;
193 --with-ipv6) NGX_IPV6=YES ;;
195 --without-http) HTTP=NO ;;
196 --without-http-cache) HTTP_CACHE=NO ;;
198 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
199 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
200 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
201 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
202 --http-uwsgi-temp-path=*) NGX_HTTP_UWSGI_TEMP_PATH="$value" ;;
203 --http-scgi-temp-path=*) NGX_HTTP_SCGI_TEMP_PATH="$value" ;;
205 --with-http_ssl_module) HTTP_SSL=YES ;;
206 --with-http_spdy_module) HTTP_SPDY=YES ;;
207 --with-http_realip_module) HTTP_REALIP=YES ;;
208 --with-http_addition_module) HTTP_ADDITION=YES ;;
209 --with-http_xslt_module) HTTP_XSLT=YES ;;
210 --with-http_image_filter_module) HTTP_IMAGE_FILTER=YES ;;
211 --with-http_geoip_module) HTTP_GEOIP=YES ;;
212 --with-http_sub_module) HTTP_SUB=YES ;;
213 --with-http_dav_module) HTTP_DAV=YES ;;
214 --with-http_flv_module) HTTP_FLV=YES ;;
215 --with-http_mp4_module) HTTP_MP4=YES ;;
216 --with-http_gunzip_module) HTTP_GUNZIP=YES ;;
217 --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
218 --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
219 --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
220 --with-http_degradation_module) HTTP_DEGRADATION=YES ;;
222 --without-http_charset_module) HTTP_CHARSET=NO ;;
223 --without-http_gzip_module) HTTP_GZIP=NO ;;
224 --without-http_ssi_module) HTTP_SSI=NO ;;
225 --without-http_userid_module) HTTP_USERID=NO ;;
226 --without-http_access_module) HTTP_ACCESS=NO ;;
227 --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
228 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
229 --without-http_status_module) HTTP_STATUS=NO ;;
230 --without-http_geo_module) HTTP_GEO=NO ;;
231 --without-http_map_module) HTTP_MAP=NO ;;
232 --without-http_split_clients_module) HTTP_SPLIT_CLIENTS=NO ;;
233 --without-http_referer_module) HTTP_REFERER=NO ;;
234 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
235 --without-http_proxy_module) HTTP_PROXY=NO ;;
236 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
237 --without-http_uwsgi_module) HTTP_UWSGI=NO ;;
238 --without-http_scgi_module) HTTP_SCGI=NO ;;
239 --without-http_memcached_module) HTTP_MEMCACHED=NO ;;
240 --without-http_limit_zone_module)
242 NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
243 $0: warning: the \"--without-http_limit_zone_module\" option is deprecated, \
244 use the \"--without-http_limit_conn_module\" option instead"
246 --without-http_limit_conn_module) HTTP_LIMIT_CONN=NO ;;
247 --without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
248 --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
249 --without-http_browser_module) HTTP_BROWSER=NO ;;
250 --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
251 --without-http_upstream_least_conn_module)
252 HTTP_UPSTREAM_LEAST_CONN=NO ;;
253 --without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
255 --with-http_perl_module) HTTP_PERL=YES ;;
256 --with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
257 --with-perl=*) NGX_PERL="$value" ;;
260 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
262 --with-mail) MAIL=YES ;;
263 --with-mail_ssl_module) MAIL_SSL=YES ;;
265 --with-imap) MAIL=YES ;;
266 --with-imap_ssl_module) MAIL_SSL=YES ;;
267 --without-mail_pop3_module) MAIL_POP3=NO ;;
268 --without-mail_imap_module) MAIL_IMAP=NO ;;
269 --without-mail_smtp_module) MAIL_SMTP=NO ;;
271 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
272 --with-cpp_test_module) NGX_CPP_TEST=YES ;;
274 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
276 --with-cc=*) CC="$value" ;;
277 --with-cpp=*) CPP="$value" ;;
278 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
279 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
280 --with-cpu-opt=*) CPU="$value" ;;
281 --with-debug) NGX_DEBUG=YES ;;
283 --without-pcre) USE_PCRE=DISABLED ;;
284 --with-pcre) USE_PCRE=YES ;;
285 --with-pcre=*) PCRE="$value" ;;
286 --with-pcre-opt=*) PCRE_OPT="$value" ;;
287 --with-pcre-jit) PCRE_JIT=YES ;;
289 --with-openssl=*) OPENSSL="$value" ;;
290 --with-openssl-opt=*) OPENSSL_OPT="$value" ;;
292 --with-md5=*) MD5="$value" ;;
293 --with-md5-opt=*) MD5_OPT="$value" ;;
294 --with-md5-asm) MD5_ASM=YES ;;
296 --with-sha1=*) SHA1="$value" ;;
297 --with-sha1-opt=*) SHA1_OPT="$value" ;;
298 --with-sha1-asm) SHA1_ASM=YES ;;
300 --with-zlib=*) ZLIB="$value" ;;
301 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
302 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
304 --with-libatomic) NGX_LIBATOMIC=YES ;;
305 --with-libatomic=*) NGX_LIBATOMIC="$value" ;;
307 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
308 --test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
309 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
310 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
311 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
314 echo "$0: error: invalid option \"$option\""
324 if [ $help = yes ]; then
328 --help print this message
330 --prefix=PATH set installation prefix
331 --sbin-path=PATH set nginx binary pathname
332 --conf-path=PATH set nginx.conf pathname
333 --error-log-path=PATH set error log pathname
334 --pid-path=PATH set nginx.pid pathname
335 --lock-path=PATH set nginx.lock pathname
337 --user=USER set non-privileged user for
339 --group=GROUP set non-privileged group for
342 --builddir=DIR set build directory
344 --with-rtsig_module enable rtsig module
345 --with-select_module enable select module
346 --without-select_module disable select module
347 --with-poll_module enable poll module
348 --without-poll_module disable poll module
350 --with-file-aio enable file AIO support
351 --with-ipv6 enable IPv6 support
353 --with-http_ssl_module enable ngx_http_ssl_module
354 --with-http_spdy_module enable ngx_http_spdy_module
355 --with-http_realip_module enable ngx_http_realip_module
356 --with-http_addition_module enable ngx_http_addition_module
357 --with-http_xslt_module enable ngx_http_xslt_module
358 --with-http_image_filter_module enable ngx_http_image_filter_module
359 --with-http_geoip_module enable ngx_http_geoip_module
360 --with-http_sub_module enable ngx_http_sub_module
361 --with-http_dav_module enable ngx_http_dav_module
362 --with-http_flv_module enable ngx_http_flv_module
363 --with-http_mp4_module enable ngx_http_mp4_module
364 --with-http_gunzip_module enable ngx_http_gunzip_module
365 --with-http_gzip_static_module enable ngx_http_gzip_static_module
366 --with-http_random_index_module enable ngx_http_random_index_module
367 --with-http_secure_link_module enable ngx_http_secure_link_module
368 --with-http_degradation_module enable ngx_http_degradation_module
369 --with-http_stub_status_module enable ngx_http_stub_status_module
371 --without-http_charset_module disable ngx_http_charset_module
372 --without-http_gzip_module disable ngx_http_gzip_module
373 --without-http_ssi_module disable ngx_http_ssi_module
374 --without-http_userid_module disable ngx_http_userid_module
375 --without-http_access_module disable ngx_http_access_module
376 --without-http_auth_basic_module disable ngx_http_auth_basic_module
377 --without-http_autoindex_module disable ngx_http_autoindex_module
378 --without-http_geo_module disable ngx_http_geo_module
379 --without-http_map_module disable ngx_http_map_module
380 --without-http_split_clients_module disable ngx_http_split_clients_module
381 --without-http_referer_module disable ngx_http_referer_module
382 --without-http_rewrite_module disable ngx_http_rewrite_module
383 --without-http_proxy_module disable ngx_http_proxy_module
384 --without-http_fastcgi_module disable ngx_http_fastcgi_module
385 --without-http_uwsgi_module disable ngx_http_uwsgi_module
386 --without-http_scgi_module disable ngx_http_scgi_module
387 --without-http_memcached_module disable ngx_http_memcached_module
388 --without-http_limit_conn_module disable ngx_http_limit_conn_module
389 --without-http_limit_req_module disable ngx_http_limit_req_module
390 --without-http_empty_gif_module disable ngx_http_empty_gif_module
391 --without-http_browser_module disable ngx_http_browser_module
392 --without-http_upstream_ip_hash_module
393 disable ngx_http_upstream_ip_hash_module
394 --without-http_upstream_least_conn_module
395 disable ngx_http_upstream_least_conn_module
396 --without-http_upstream_keepalive_module
397 disable ngx_http_upstream_keepalive_module
399 --with-http_perl_module enable ngx_http_perl_module
400 --with-perl_modules_path=PATH set Perl modules path
401 --with-perl=PATH set perl binary pathname
403 --http-log-path=PATH set http access log pathname
404 --http-client-body-temp-path=PATH set path to store
405 http client request body temporary files
406 --http-proxy-temp-path=PATH set path to store
407 http proxy temporary files
408 --http-fastcgi-temp-path=PATH set path to store
409 http fastcgi temporary files
410 --http-uwsgi-temp-path=PATH set path to store
411 http uwsgi temporary files
412 --http-scgi-temp-path=PATH set path to store
413 http scgi temporary files
415 --without-http disable HTTP server
416 --without-http-cache disable HTTP cache
418 --with-mail enable POP3/IMAP4/SMTP proxy module
419 --with-mail_ssl_module enable ngx_mail_ssl_module
420 --without-mail_pop3_module disable ngx_mail_pop3_module
421 --without-mail_imap_module disable ngx_mail_imap_module
422 --without-mail_smtp_module disable ngx_mail_smtp_module
424 --with-google_perftools_module enable ngx_google_perftools_module
425 --with-cpp_test_module enable ngx_cpp_test_module
427 --add-module=PATH enable an external module
429 --with-cc=PATH set C compiler pathname
430 --with-cpp=PATH set C preprocessor pathname
431 --with-cc-opt=OPTIONS set additional C compiler options
432 --with-ld-opt=OPTIONS set additional linker options
433 --with-cpu-opt=CPU build for the specified CPU, valid values:
434 pentium, pentiumpro, pentium3, pentium4,
435 athlon, opteron, sparc32, sparc64, ppc64
437 --without-pcre disable PCRE library usage
438 --with-pcre force PCRE library usage
439 --with-pcre=DIR set path to PCRE library sources
440 --with-pcre-opt=OPTIONS set additional build options for PCRE
441 --with-pcre-jit build PCRE with JIT compilation support
443 --with-md5=DIR set path to md5 library sources
444 --with-md5-opt=OPTIONS set additional build options for md5
445 --with-md5-asm use md5 assembler sources
447 --with-sha1=DIR set path to sha1 library sources
448 --with-sha1-opt=OPTIONS set additional build options for sha1
449 --with-sha1-asm use sha1 assembler sources
451 --with-zlib=DIR set path to zlib library sources
452 --with-zlib-opt=OPTIONS set additional build options for zlib
453 --with-zlib-asm=CPU use zlib assembler sources optimized
454 for the specified CPU, valid values:
457 --with-libatomic force libatomic_ops library usage
458 --with-libatomic=DIR set path to libatomic_ops library sources
460 --with-openssl=DIR set path to OpenSSL library sources
461 --with-openssl-opt=OPTIONS set additional build options for OpenSSL
463 --with-debug enable debug logging
471 if [ $HTTP = NO ]; then
484 if [ ".$NGX_PLATFORM" = ".win32" ]; then
489 NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
490 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
491 NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
492 NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
494 if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
497 NGX_ERROR_LOG_PATH=${NGX_ERROR_LOG_PATH:-logs/error.log}
500 NGX_HTTP_LOG_PATH=${NGX_HTTP_LOG_PATH:-logs/access.log}
501 NGX_HTTP_CLIENT_TEMP_PATH=${NGX_HTTP_CLIENT_TEMP_PATH:-client_body_temp}
502 NGX_HTTP_PROXY_TEMP_PATH=${NGX_HTTP_PROXY_TEMP_PATH:-proxy_temp}
503 NGX_HTTP_FASTCGI_TEMP_PATH=${NGX_HTTP_FASTCGI_TEMP_PATH:-fastcgi_temp}
504 NGX_HTTP_UWSGI_TEMP_PATH=${NGX_HTTP_UWSGI_TEMP_PATH:-uwsgi_temp}
505 NGX_HTTP_SCGI_TEMP_PATH=${NGX_HTTP_SCGI_TEMP_PATH:-scgi_temp}
507 case ".$NGX_PERL_MODULES" in
515 NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES