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
49 NGX_HTTP_CLIENT_TEMP_PATH=
50 NGX_HTTP_PROXY_TEMP_PATH=
51 NGX_HTTP_FASTCGI_TEMP_PATH=
81 HTTP_UPSTREAM_IP_HASH=YES
121 NGX_GOOGLE_PERFTOOLS=NO
129 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
136 --prefix=*) NGX_PREFIX="$value" ;;
137 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
138 --conf-path=*) NGX_CONF_PATH="$value" ;;
139 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
140 --pid-path=*) NGX_PID_PATH="$value" ;;
141 --lock-path=*) NGX_LOCK_PATH="$value" ;;
142 --user=*) NGX_USER="$value" ;;
143 --group=*) NGX_GROUP="$value" ;;
145 --crossbuild=*) NGX_PLATFORM="$value" ;;
147 --builddir=*) NGX_OBJS="$value" ;;
149 --with-rtsig_module) EVENT_RTSIG=YES ;;
150 --with-select_module) EVENT_SELECT=YES ;;
151 --without-select_module) EVENT_SELECT=NONE ;;
152 --with-poll_module) EVENT_POLL=YES ;;
153 --without-poll_module) EVENT_POLL=NONE ;;
154 --with-aio_module) EVENT_AIO=YES ;;
156 #--with-threads=*) USE_THREADS="$value" ;;
157 #--with-threads) USE_THREADS="pthreads" ;;
159 --without-http) HTTP=NO ;;
160 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
161 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
162 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
163 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
165 --with-http_ssl_module) HTTP_SSL=YES ;;
166 --with-http_realip_module) HTTP_REALIP=YES ;;
167 --with-http_addition_module) HTTP_ADDITION=YES ;;
168 --with-http_xslt_module) HTTP_XSLT=YES ;;
169 --with-http_sub_module) HTTP_SUB=YES ;;
170 --with-http_dav_module) HTTP_DAV=YES ;;
171 --with-http_flv_module) HTTP_FLV=YES ;;
172 --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
174 --without-http_charset_module) HTTP_CHARSET=NO ;;
175 --without-http_gzip_module) HTTP_GZIP=NO ;;
176 --without-http_ssi_module) HTTP_SSI=NO ;;
177 --without-http_userid_module) HTTP_USERID=NO ;;
178 --without-http_access_module) HTTP_ACCESS=NO ;;
179 --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
180 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
181 --without-http_status_module) HTTP_STATUS=NO ;;
182 --without-http_geo_module) HTTP_GEO=NO ;;
183 --without-http_map_module) HTTP_MAP=NO ;;
184 --without-http_referer_module) HTTP_REFERER=NO ;;
185 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
186 --without-http_proxy_module) HTTP_PROXY=NO ;;
187 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
188 --without-http_memcached_module) HTTP_MEMCACHED=NO ;;
189 --without-http_limit_zone_module) HTTP_LIMIT_ZONE=NO ;;
190 --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
191 --without-http_browser_module) HTTP_BROWSER=NO ;;
192 --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
194 --with-http_perl_module) HTTP_PERL=YES ;;
195 --with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
196 --with-perl=*) NGX_PERL="$value" ;;
199 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
201 --with-mail) MAIL=YES ;;
202 --with-mail_ssl_module) MAIL_SSL=YES ;;
204 --with-imap) MAIL=YES ;;
205 --with-imap_ssl_module) MAIL_SSL=YES ;;
206 --without-mail_pop3_module) MAIL_POP3=NO ;;
207 --without-mail_imap_module) MAIL_IMAP=NO ;;
208 --without-mail_smtp_module) MAIL_SMTP=NO ;;
210 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
212 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
214 --with-cc=*) CC="$value" ;;
215 --with-cpp=*) CPP="$value" ;;
216 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
217 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
218 --with-cpu-opt=*) CPU="$value" ;;
219 --with-debug) NGX_DEBUG=YES ;;
221 --without-pcre) USE_PCRE=DISABLED ;;
222 --with-pcre=*) PCRE="$value" ;;
223 --with-pcre-opt=*) PCRE_OPT="$value" ;;
225 --with-openssl=*) OPENSSL="$value" ;;
226 --with-openssl-opt=*) OPENSSL_OPT="$value" ;;
228 --with-md5=*) MD5="$value" ;;
229 --with-md5-opt=*) MD5_OPT="$value" ;;
230 --with-md5-asm) MD5_ASM=YES ;;
232 --with-sha1=*) SHA1="$value" ;;
233 --with-sha1-opt=*) SHA1_OPT="$value" ;;
234 --with-sha1-asm) SHA1_ASM=YES ;;
236 --with-zlib=*) ZLIB="$value" ;;
237 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
238 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
240 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
241 --test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
242 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
243 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
244 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
247 echo "$0: error: invalid option \"$option\""
254 if [ $help = yes ]; then
260 --prefix=PATH set the installation prefix
261 --sbin-path=PATH set path to the nginx binary file
262 --conf-path=PATH set path to the nginx.conf file
263 --error-log-path=PATH set path to the error log
264 --pid-path=PATH set path to nginx.pid file
265 --lock-path=PATH set path to nginx.lock file
267 --user=USER set non-privilege user
268 for the worker processes
269 --group=GROUP set non-privilege group
270 for the worker processes
272 --builddir=DIR set the build directory
274 --with-rtsig_module enable rtsig module
275 --with-select_module enable select module
276 --without-select_module disable select module
277 --with-poll_module enable poll module
278 --without-poll_module disable poll module
280 --with-http_ssl_module enable ngx_http_ssl_module
281 --with-http_realip_module enable ngx_http_realip_module
282 --with-http_addition_module enable ngx_http_addition_module
283 --with-http_xslt_module enable ngx_http_xslt_module
284 --with-http_sub_module enable ngx_http_sub_module
285 --with-http_dav_module enable ngx_http_dav_module
286 --with-http_flv_module enable ngx_http_flv_module
287 --with-http_gzip_static_module enable ngx_http_gzip_static_module
288 --with-http_stub_status_module enable ngx_http_stub_status_module
290 --without-http_charset_module disable ngx_http_charset_module
291 --without-http_gzip_module disable ngx_http_gzip_module
292 --without-http_ssi_module disable ngx_http_ssi_module
293 --without-http_userid_module disable ngx_http_userid_module
294 --without-http_access_module disable ngx_http_access_module
295 --without-http_auth_basic_module disable ngx_http_auth_basic_module
296 --without-http_autoindex_module disable ngx_http_autoindex_module
297 --without-http_geo_module disable ngx_http_geo_module
298 --without-http_map_module disable ngx_http_map_module
299 --without-http_referer_module disable ngx_http_referer_module
300 --without-http_rewrite_module disable ngx_http_rewrite_module
301 --without-http_proxy_module disable ngx_http_proxy_module
302 --without-http_fastcgi_module disable ngx_http_fastcgi_module
303 --without-http_memcached_module disable ngx_http_memcached_module
304 --without-http_limit_zone_module disable ngx_http_limit_zone_module
305 --without-http_empty_gif_module disable ngx_http_empty_gif_module
306 --without-http_browser_module disable ngx_http_browser_module
307 --without-http_upstream_ip_hash_module
308 disable ngx_http_upstream_ip_hash_module
310 --with-http_perl_module enable ngx_http_perl_module
311 --with-perl_modules_path=PATH set path to the perl modules
312 --with-perl=PATH set path to the perl binary
314 --http-log-path=PATH set path to the http access log
315 --http-client-body-temp-path=PATH set path to the http client request body
317 --http-proxy-temp-path=PATH set path to the http proxy temporary files
318 --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
321 --without-http disable HTTP server
323 --with-mail enable POP3/IMAP4/SMTP proxy module
324 --with-mail_ssl_module enable ngx_mail_ssl_module
325 --without-mail_pop3_module disable ngx_mail_pop3_module
326 --without-mail_imap_module disable ngx_mail_imap_module
327 --without-mail_smtp_module disable ngx_mail_smtp_module
329 --with-google_perftools_module enable ngx_google_perftools_module
331 --add-module=PATH enable an external module
333 --with-cc=PATH set path to C compiler
334 --with-cpp=PATH set path to C preprocessor
335 --with-cc-opt=OPTIONS set additional options for C compiler
336 --with-ld-opt=OPTIONS set additional options for linker
337 --with-cpu-opt=CPU build for specified CPU, the valid values:
338 pentium, pentiumpro, pentium3, pentium4,
339 athlon, opteron, sparc32, sparc64, ppc64
341 --without-pcre disable PCRE libarary usage
342 --with-pcre=DIR set path to PCRE library sources
343 --with-pcre-opt=OPTIONS set additional options for PCRE building
345 --with-md5=DIR set path to md5 library sources
346 --with-md5-opt=OPTIONS set additional options for md5 building
347 --with-md5-asm use md5 assembler sources
349 --with-sha1=DIR set path to sha1 library sources
350 --with-sha1-opt=OPTIONS set additional options for sha1 building
351 --with-sha1-asm use sha1 assembler sources
353 --with-zlib=DIR set path to zlib library sources
354 --with-zlib-opt=OPTIONS set additional options for zlib building
355 --with-zlib-asm=CPU use zlib assembler sources optimized
356 for specified CPU, the valid values:
359 --with-openssl=DIR set path to OpenSSL library sources
360 --with-openssl-opt=OPTIONS set additional options for OpenSSL building
362 --with-debug enable the debugging logging
370 if [ $HTTP = NO ]; then
383 if [ ".$NGX_PLATFORM" = ".win32" ]; then
388 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
391 case ".$NGX_SBIN_PATH" in
396 NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
400 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
405 case ".$NGX_CONF_PATH" in
410 NGX_CONF_PATH=$NGX_PREFIX/conf/nginx.conf
414 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
419 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
422 case ".$NGX_PID_PATH" in
427 NGX_PID_PATH=$NGX_PREFIX/logs/nginx.pid
431 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
436 case ".$NGX_LOCK_PATH" in
441 NGX_LOCK_PATH=$NGX_PREFIX/logs/nginx.lock
445 NGX_LOCK_PATH=$NGX_PREFIX/$NGX_LOCK_PATH
450 case ".$NGX_ERROR_LOG_PATH" in
455 NGX_ERROR_LOG_PATH=$NGX_PREFIX/logs/error.log
463 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
468 case ".$NGX_HTTP_LOG_PATH" in
473 NGX_HTTP_LOG_PATH=$NGX_PREFIX/logs/access.log
477 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
482 case ".$NGX_HTTP_CLIENT_TEMP_PATH" in
487 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp
491 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH
496 case ".$NGX_HTTP_PROXY_TEMP_PATH" in
501 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp
505 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH
510 case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in
515 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp
519 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH
524 case ".$NGX_PERL_MODULES" in
532 NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES