2 # Copyright (C) Igor Sysoev
28 NGX_TEST_BUILD_DEVPOLL=NO
29 NGX_TEST_BUILD_EVENTPORT=NO
30 NGX_TEST_BUILD_EPOLL=NO
31 NGX_TEST_BUILD_RTSIG=NO
32 NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
51 NGX_HTTP_CLIENT_TEMP_PATH=
52 NGX_HTTP_PROXY_TEMP_PATH=
53 NGX_HTTP_FASTCGI_TEMP_PATH=
86 HTTP_UPSTREAM_IP_HASH=YES
126 NGX_GOOGLE_PERFTOOLS=NO
135 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
142 --prefix=*) NGX_PREFIX="$value" ;;
143 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
144 --conf-path=*) NGX_CONF_PATH="$value" ;;
145 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
146 --pid-path=*) NGX_PID_PATH="$value" ;;
147 --lock-path=*) NGX_LOCK_PATH="$value" ;;
148 --user=*) NGX_USER="$value" ;;
149 --group=*) NGX_GROUP="$value" ;;
151 --crossbuild=*) NGX_PLATFORM="$value" ;;
153 --builddir=*) NGX_OBJS="$value" ;;
155 --with-rtsig_module) EVENT_RTSIG=YES ;;
156 --with-select_module) EVENT_SELECT=YES ;;
157 --without-select_module) EVENT_SELECT=NONE ;;
158 --with-poll_module) EVENT_POLL=YES ;;
159 --without-poll_module) EVENT_POLL=NONE ;;
160 --with-aio_module) EVENT_AIO=YES ;;
162 #--with-threads=*) USE_THREADS="$value" ;;
163 #--with-threads) USE_THREADS="pthreads" ;;
165 --with-ipv6) NGX_IPV6=YES ;;
167 --without-http) HTTP=NO ;;
168 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
169 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
170 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
171 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
173 --with-http_ssl_module) HTTP_SSL=YES ;;
174 --with-http_realip_module) HTTP_REALIP=YES ;;
175 --with-http_addition_module) HTTP_ADDITION=YES ;;
176 --with-http_xslt_module) HTTP_XSLT=YES ;;
177 --with-http_sub_module) HTTP_SUB=YES ;;
178 --with-http_dav_module) HTTP_DAV=YES ;;
179 --with-http_flv_module) HTTP_FLV=YES ;;
180 --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
181 --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
182 --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
184 --without-http_charset_module) HTTP_CHARSET=NO ;;
185 --without-http_gzip_module) HTTP_GZIP=NO ;;
186 --without-http_ssi_module) HTTP_SSI=NO ;;
187 --without-http_userid_module) HTTP_USERID=NO ;;
188 --without-http_access_module) HTTP_ACCESS=NO ;;
189 --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
190 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
191 --without-http_status_module) HTTP_STATUS=NO ;;
192 --without-http_geo_module) HTTP_GEO=NO ;;
193 --without-http_map_module) HTTP_MAP=NO ;;
194 --without-http_referer_module) HTTP_REFERER=NO ;;
195 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
196 --without-http_proxy_module) HTTP_PROXY=NO ;;
197 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
198 --without-http_memcached_module) HTTP_MEMCACHED=NO ;;
199 --without-http_limit_zone_module) HTTP_LIMIT_ZONE=NO ;;
200 --without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
201 --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
202 --without-http_browser_module) HTTP_BROWSER=NO ;;
203 --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
205 --with-http_perl_module) HTTP_PERL=YES ;;
206 --with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
207 --with-perl=*) NGX_PERL="$value" ;;
210 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
212 --with-mail) MAIL=YES ;;
213 --with-mail_ssl_module) MAIL_SSL=YES ;;
215 --with-imap) MAIL=YES ;;
216 --with-imap_ssl_module) MAIL_SSL=YES ;;
217 --without-mail_pop3_module) MAIL_POP3=NO ;;
218 --without-mail_imap_module) MAIL_IMAP=NO ;;
219 --without-mail_smtp_module) MAIL_SMTP=NO ;;
221 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
222 --with-cpp_test_module) NGX_CPP_TEST=YES ;;
224 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
226 --with-cc=*) CC="$value" ;;
227 --with-cpp=*) CPP="$value" ;;
228 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
229 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
230 --with-cpu-opt=*) CPU="$value" ;;
231 --with-debug) NGX_DEBUG=YES ;;
233 --without-pcre) USE_PCRE=DISABLED ;;
234 --with-pcre=*) PCRE="$value" ;;
235 --with-pcre-opt=*) PCRE_OPT="$value" ;;
237 --with-openssl=*) OPENSSL="$value" ;;
238 --with-openssl-opt=*) OPENSSL_OPT="$value" ;;
240 --with-md5=*) MD5="$value" ;;
241 --with-md5-opt=*) MD5_OPT="$value" ;;
242 --with-md5-asm) MD5_ASM=YES ;;
244 --with-sha1=*) SHA1="$value" ;;
245 --with-sha1-opt=*) SHA1_OPT="$value" ;;
246 --with-sha1-asm) SHA1_ASM=YES ;;
248 --with-zlib=*) ZLIB="$value" ;;
249 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
250 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
252 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
253 --test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
254 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
255 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
256 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
259 echo "$0: error: invalid option \"$option\""
266 if [ $help = yes ]; then
272 --prefix=PATH set the installation prefix
273 --sbin-path=PATH set path to the nginx binary file
274 --conf-path=PATH set path to the nginx.conf file
275 --error-log-path=PATH set path to the error log
276 --pid-path=PATH set path to nginx.pid file
277 --lock-path=PATH set path to nginx.lock file
279 --user=USER set non-privilege user
280 for the worker processes
281 --group=GROUP set non-privilege group
282 for the worker processes
284 --builddir=DIR set the build directory
286 --with-rtsig_module enable rtsig module
287 --with-select_module enable select module
288 --without-select_module disable select module
289 --with-poll_module enable poll module
290 --without-poll_module disable poll module
292 --with-ipv6 enable ipv6 support
294 --with-http_ssl_module enable ngx_http_ssl_module
295 --with-http_realip_module enable ngx_http_realip_module
296 --with-http_addition_module enable ngx_http_addition_module
297 --with-http_xslt_module enable ngx_http_xslt_module
298 --with-http_sub_module enable ngx_http_sub_module
299 --with-http_dav_module enable ngx_http_dav_module
300 --with-http_flv_module enable ngx_http_flv_module
301 --with-http_gzip_static_module enable ngx_http_gzip_static_module
302 --with-http_random_index_module enable ngx_http_random_index_module
303 --with-http_secure_link_module enable ngx_http_secure_link_module
304 --with-http_stub_status_module enable ngx_http_stub_status_module
306 --without-http_charset_module disable ngx_http_charset_module
307 --without-http_gzip_module disable ngx_http_gzip_module
308 --without-http_ssi_module disable ngx_http_ssi_module
309 --without-http_userid_module disable ngx_http_userid_module
310 --without-http_access_module disable ngx_http_access_module
311 --without-http_auth_basic_module disable ngx_http_auth_basic_module
312 --without-http_autoindex_module disable ngx_http_autoindex_module
313 --without-http_geo_module disable ngx_http_geo_module
314 --without-http_map_module disable ngx_http_map_module
315 --without-http_referer_module disable ngx_http_referer_module
316 --without-http_rewrite_module disable ngx_http_rewrite_module
317 --without-http_proxy_module disable ngx_http_proxy_module
318 --without-http_fastcgi_module disable ngx_http_fastcgi_module
319 --without-http_memcached_module disable ngx_http_memcached_module
320 --without-http_limit_zone_module disable ngx_http_limit_zone_module
321 --without-http_limit_req_module disable ngx_http_limit_req_module
322 --without-http_empty_gif_module disable ngx_http_empty_gif_module
323 --without-http_browser_module disable ngx_http_browser_module
324 --without-http_upstream_ip_hash_module
325 disable ngx_http_upstream_ip_hash_module
327 --with-http_perl_module enable ngx_http_perl_module
328 --with-perl_modules_path=PATH set path to the perl modules
329 --with-perl=PATH set path to the perl binary
331 --http-log-path=PATH set path to the http access log
332 --http-client-body-temp-path=PATH set path to the http client request body
334 --http-proxy-temp-path=PATH set path to the http proxy temporary files
335 --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
338 --without-http disable HTTP server
340 --with-mail enable POP3/IMAP4/SMTP proxy module
341 --with-mail_ssl_module enable ngx_mail_ssl_module
342 --without-mail_pop3_module disable ngx_mail_pop3_module
343 --without-mail_imap_module disable ngx_mail_imap_module
344 --without-mail_smtp_module disable ngx_mail_smtp_module
346 --with-google_perftools_module enable ngx_google_perftools_module
347 --with-cpp_test_module enable ngx_cpp_test_module
349 --add-module=PATH enable an external module
351 --with-cc=PATH set path to C compiler
352 --with-cpp=PATH set path to C preprocessor
353 --with-cc-opt=OPTIONS set additional options for C compiler
354 --with-ld-opt=OPTIONS set additional options for linker
355 --with-cpu-opt=CPU build for specified CPU, the valid values:
356 pentium, pentiumpro, pentium3, pentium4,
357 athlon, opteron, sparc32, sparc64, ppc64
359 --without-pcre disable PCRE libarary usage
360 --with-pcre=DIR set path to PCRE library sources
361 --with-pcre-opt=OPTIONS set additional options for PCRE building
363 --with-md5=DIR set path to md5 library sources
364 --with-md5-opt=OPTIONS set additional options for md5 building
365 --with-md5-asm use md5 assembler sources
367 --with-sha1=DIR set path to sha1 library sources
368 --with-sha1-opt=OPTIONS set additional options for sha1 building
369 --with-sha1-asm use sha1 assembler sources
371 --with-zlib=DIR set path to zlib library sources
372 --with-zlib-opt=OPTIONS set additional options for zlib building
373 --with-zlib-asm=CPU use zlib assembler sources optimized
374 for specified CPU, the valid values:
377 --with-openssl=DIR set path to OpenSSL library sources
378 --with-openssl-opt=OPTIONS set additional options for OpenSSL building
380 --with-debug enable the debugging logging
388 if [ $HTTP = NO ]; then
401 if [ ".$NGX_PLATFORM" = ".win32" ]; then
406 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
409 case ".$NGX_SBIN_PATH" in
414 NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
418 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
423 case ".$NGX_CONF_PATH" in
428 NGX_CONF_PATH=$NGX_PREFIX/conf/nginx.conf
432 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
437 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
440 case ".$NGX_PID_PATH" in
445 NGX_PID_PATH=$NGX_PREFIX/logs/nginx.pid
449 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
454 case ".$NGX_LOCK_PATH" in
459 NGX_LOCK_PATH=$NGX_PREFIX/logs/nginx.lock
463 NGX_LOCK_PATH=$NGX_PREFIX/$NGX_LOCK_PATH
468 case ".$NGX_ERROR_LOG_PATH" in
473 NGX_ERROR_LOG_PATH=$NGX_PREFIX/logs/error.log
481 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
486 case ".$NGX_HTTP_LOG_PATH" in
491 NGX_HTTP_LOG_PATH=$NGX_PREFIX/logs/access.log
495 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
500 case ".$NGX_HTTP_CLIENT_TEMP_PATH" in
505 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp
509 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH
514 case ".$NGX_HTTP_PROXY_TEMP_PATH" in
519 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp
523 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH
528 case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in
533 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp
537 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH
542 case ".$NGX_PERL_MODULES" in
550 NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES