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=
84 HTTP_UPSTREAM_IP_HASH=YES
124 NGX_GOOGLE_PERFTOOLS=NO
133 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
140 --prefix=*) NGX_PREFIX="$value" ;;
141 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
142 --conf-path=*) NGX_CONF_PATH="$value" ;;
143 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
144 --pid-path=*) NGX_PID_PATH="$value" ;;
145 --lock-path=*) NGX_LOCK_PATH="$value" ;;
146 --user=*) NGX_USER="$value" ;;
147 --group=*) NGX_GROUP="$value" ;;
149 --crossbuild=*) NGX_PLATFORM="$value" ;;
151 --builddir=*) NGX_OBJS="$value" ;;
153 --with-rtsig_module) EVENT_RTSIG=YES ;;
154 --with-select_module) EVENT_SELECT=YES ;;
155 --without-select_module) EVENT_SELECT=NONE ;;
156 --with-poll_module) EVENT_POLL=YES ;;
157 --without-poll_module) EVENT_POLL=NONE ;;
158 --with-aio_module) EVENT_AIO=YES ;;
160 #--with-threads=*) USE_THREADS="$value" ;;
161 #--with-threads) USE_THREADS="pthreads" ;;
163 --without-http) HTTP=NO ;;
164 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
165 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
166 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
167 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
169 --with-http_ssl_module) HTTP_SSL=YES ;;
170 --with-http_realip_module) HTTP_REALIP=YES ;;
171 --with-http_addition_module) HTTP_ADDITION=YES ;;
172 --with-http_xslt_module) HTTP_XSLT=YES ;;
173 --with-http_sub_module) HTTP_SUB=YES ;;
174 --with-http_dav_module) HTTP_DAV=YES ;;
175 --with-http_flv_module) HTTP_FLV=YES ;;
176 --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
177 --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
178 --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
180 --without-http_charset_module) HTTP_CHARSET=NO ;;
181 --without-http_gzip_module) HTTP_GZIP=NO ;;
182 --without-http_ssi_module) HTTP_SSI=NO ;;
183 --without-http_userid_module) HTTP_USERID=NO ;;
184 --without-http_access_module) HTTP_ACCESS=NO ;;
185 --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
186 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
187 --without-http_status_module) HTTP_STATUS=NO ;;
188 --without-http_geo_module) HTTP_GEO=NO ;;
189 --without-http_map_module) HTTP_MAP=NO ;;
190 --without-http_referer_module) HTTP_REFERER=NO ;;
191 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
192 --without-http_proxy_module) HTTP_PROXY=NO ;;
193 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
194 --without-http_memcached_module) HTTP_MEMCACHED=NO ;;
195 --without-http_limit_zone_module) HTTP_LIMIT_ZONE=NO ;;
196 --without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
197 --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
198 --without-http_browser_module) HTTP_BROWSER=NO ;;
199 --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
201 --with-http_perl_module) HTTP_PERL=YES ;;
202 --with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
203 --with-perl=*) NGX_PERL="$value" ;;
206 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
208 --with-mail) MAIL=YES ;;
209 --with-mail_ssl_module) MAIL_SSL=YES ;;
211 --with-imap) MAIL=YES ;;
212 --with-imap_ssl_module) MAIL_SSL=YES ;;
213 --without-mail_pop3_module) MAIL_POP3=NO ;;
214 --without-mail_imap_module) MAIL_IMAP=NO ;;
215 --without-mail_smtp_module) MAIL_SMTP=NO ;;
217 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
218 --with-cpp_test_module) NGX_CPP_TEST=YES ;;
220 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
222 --with-cc=*) CC="$value" ;;
223 --with-cpp=*) CPP="$value" ;;
224 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
225 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
226 --with-cpu-opt=*) CPU="$value" ;;
227 --with-debug) NGX_DEBUG=YES ;;
229 --without-pcre) USE_PCRE=DISABLED ;;
230 --with-pcre=*) PCRE="$value" ;;
231 --with-pcre-opt=*) PCRE_OPT="$value" ;;
233 --with-openssl=*) OPENSSL="$value" ;;
234 --with-openssl-opt=*) OPENSSL_OPT="$value" ;;
236 --with-md5=*) MD5="$value" ;;
237 --with-md5-opt=*) MD5_OPT="$value" ;;
238 --with-md5-asm) MD5_ASM=YES ;;
240 --with-sha1=*) SHA1="$value" ;;
241 --with-sha1-opt=*) SHA1_OPT="$value" ;;
242 --with-sha1-asm) SHA1_ASM=YES ;;
244 --with-zlib=*) ZLIB="$value" ;;
245 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
246 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
248 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
249 --test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
250 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
251 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
252 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
255 echo "$0: error: invalid option \"$option\""
262 if [ $help = yes ]; then
268 --prefix=PATH set the installation prefix
269 --sbin-path=PATH set path to the nginx binary file
270 --conf-path=PATH set path to the nginx.conf file
271 --error-log-path=PATH set path to the error log
272 --pid-path=PATH set path to nginx.pid file
273 --lock-path=PATH set path to nginx.lock file
275 --user=USER set non-privilege user
276 for the worker processes
277 --group=GROUP set non-privilege group
278 for the worker processes
280 --builddir=DIR set the build directory
282 --with-rtsig_module enable rtsig module
283 --with-select_module enable select module
284 --without-select_module disable select module
285 --with-poll_module enable poll module
286 --without-poll_module disable poll module
288 --with-http_ssl_module enable ngx_http_ssl_module
289 --with-http_realip_module enable ngx_http_realip_module
290 --with-http_addition_module enable ngx_http_addition_module
291 --with-http_xslt_module enable ngx_http_xslt_module
292 --with-http_sub_module enable ngx_http_sub_module
293 --with-http_dav_module enable ngx_http_dav_module
294 --with-http_flv_module enable ngx_http_flv_module
295 --with-http_gzip_static_module enable ngx_http_gzip_static_module
296 --with-http_random_index_module enable ngx_http_random_index_module
297 --with-http_secure_link_module enable ngx_http_secure_link_module
298 --with-http_stub_status_module enable ngx_http_stub_status_module
300 --without-http_charset_module disable ngx_http_charset_module
301 --without-http_gzip_module disable ngx_http_gzip_module
302 --without-http_ssi_module disable ngx_http_ssi_module
303 --without-http_userid_module disable ngx_http_userid_module
304 --without-http_access_module disable ngx_http_access_module
305 --without-http_auth_basic_module disable ngx_http_auth_basic_module
306 --without-http_autoindex_module disable ngx_http_autoindex_module
307 --without-http_geo_module disable ngx_http_geo_module
308 --without-http_map_module disable ngx_http_map_module
309 --without-http_referer_module disable ngx_http_referer_module
310 --without-http_rewrite_module disable ngx_http_rewrite_module
311 --without-http_proxy_module disable ngx_http_proxy_module
312 --without-http_fastcgi_module disable ngx_http_fastcgi_module
313 --without-http_memcached_module disable ngx_http_memcached_module
314 --without-http_limit_zone_module disable ngx_http_limit_zone_module
315 --without-http_limit_req_module disable ngx_http_limit_req_module
316 --without-http_empty_gif_module disable ngx_http_empty_gif_module
317 --without-http_browser_module disable ngx_http_browser_module
318 --without-http_upstream_ip_hash_module
319 disable ngx_http_upstream_ip_hash_module
321 --with-http_perl_module enable ngx_http_perl_module
322 --with-perl_modules_path=PATH set path to the perl modules
323 --with-perl=PATH set path to the perl binary
325 --http-log-path=PATH set path to the http access log
326 --http-client-body-temp-path=PATH set path to the http client request body
328 --http-proxy-temp-path=PATH set path to the http proxy temporary files
329 --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
332 --without-http disable HTTP server
334 --with-mail enable POP3/IMAP4/SMTP proxy module
335 --with-mail_ssl_module enable ngx_mail_ssl_module
336 --without-mail_pop3_module disable ngx_mail_pop3_module
337 --without-mail_imap_module disable ngx_mail_imap_module
338 --without-mail_smtp_module disable ngx_mail_smtp_module
340 --with-google_perftools_module enable ngx_google_perftools_module
341 --with-cpp_test_module enable ngx_cpp_test_module
343 --add-module=PATH enable an external module
345 --with-cc=PATH set path to C compiler
346 --with-cpp=PATH set path to C preprocessor
347 --with-cc-opt=OPTIONS set additional options for C compiler
348 --with-ld-opt=OPTIONS set additional options for linker
349 --with-cpu-opt=CPU build for specified CPU, the valid values:
350 pentium, pentiumpro, pentium3, pentium4,
351 athlon, opteron, sparc32, sparc64, ppc64
353 --without-pcre disable PCRE libarary usage
354 --with-pcre=DIR set path to PCRE library sources
355 --with-pcre-opt=OPTIONS set additional options for PCRE building
357 --with-md5=DIR set path to md5 library sources
358 --with-md5-opt=OPTIONS set additional options for md5 building
359 --with-md5-asm use md5 assembler sources
361 --with-sha1=DIR set path to sha1 library sources
362 --with-sha1-opt=OPTIONS set additional options for sha1 building
363 --with-sha1-asm use sha1 assembler sources
365 --with-zlib=DIR set path to zlib library sources
366 --with-zlib-opt=OPTIONS set additional options for zlib building
367 --with-zlib-asm=CPU use zlib assembler sources optimized
368 for specified CPU, the valid values:
371 --with-openssl=DIR set path to OpenSSL library sources
372 --with-openssl-opt=OPTIONS set additional options for OpenSSL building
374 --with-debug enable the debugging logging
382 if [ $HTTP = NO ]; then
395 if [ ".$NGX_PLATFORM" = ".win32" ]; then
400 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
403 case ".$NGX_SBIN_PATH" in
408 NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
412 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
417 case ".$NGX_CONF_PATH" in
422 NGX_CONF_PATH=$NGX_PREFIX/conf/nginx.conf
426 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
431 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
434 case ".$NGX_PID_PATH" in
439 NGX_PID_PATH=$NGX_PREFIX/logs/nginx.pid
443 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
448 case ".$NGX_LOCK_PATH" in
453 NGX_LOCK_PATH=$NGX_PREFIX/logs/nginx.lock
457 NGX_LOCK_PATH=$NGX_PREFIX/$NGX_LOCK_PATH
462 case ".$NGX_ERROR_LOG_PATH" in
467 NGX_ERROR_LOG_PATH=$NGX_PREFIX/logs/error.log
475 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
480 case ".$NGX_HTTP_LOG_PATH" in
485 NGX_HTTP_LOG_PATH=$NGX_PREFIX/logs/access.log
489 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
494 case ".$NGX_HTTP_CLIENT_TEMP_PATH" in
499 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp
503 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH
508 case ".$NGX_HTTP_PROXY_TEMP_PATH" in
513 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp
517 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH
522 case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in
527 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp
531 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH
536 case ".$NGX_PERL_MODULES" in
544 NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES