2 # Copyright (C) Igor Sysoev
24 NGX_TEST_BUILD_DEVPOLL=NO
25 NGX_TEST_BUILD_EPOLL=NO
26 NGX_TEST_BUILD_RTSIG=NO
27 NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
44 NGX_HTTP_CLIENT_TEMP_PATH=
45 NGX_HTTP_PROXY_TEMP_PATH=
46 NGX_HTTP_FASTCGI_TEMP_PATH=
89 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
96 --prefix=*) NGX_PREFIX="$value" ;;
97 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
98 --conf-path=*) NGX_CONF_PATH="$value" ;;
99 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
100 --pid-path=*) NGX_PID_PATH="$value" ;;
101 --user=*) NGX_USER="$value" ;;
102 --group=*) NGX_GROUP="$value" ;;
104 --crossbuild=*) NGX_PLATFORM="$value" ;;
106 --builddir=*) NGX_OBJS="$value" ;;
108 --with-rtsig_module) EVENT_RTSIG=YES ;;
109 --with-select_module) EVENT_SELECT=YES ;;
110 --without-select_module) EVENT_SELECT=NONE ;;
111 --with-poll_module) EVENT_POLL=YES ;;
112 --without-poll_module) EVENT_POLL=NONE ;;
113 --with-aio_module) EVENT_AIO=YES ;;
115 --with-threads=*) USE_THREADS="$value" ;;
116 --with-threads) USE_THREADS="pthreads" ;;
118 --without-http) HTTP=NO ;;
119 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
120 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
121 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
122 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
124 --with-http_ssl_module) HTTP_SSL=YES ;;
125 --without-http_charset_module) HTTP_CHARSET=NO ;;
126 --without-http_gzip_module) HTTP_GZIP=NO ;;
127 --without-http_ssi_module) HTTP_SSI=NO ;;
128 --without-http_userid_module) HTTP_USERID=NO ;;
129 --without-http_access_module) HTTP_ACCESS=NO ;;
130 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
131 --without-http_status_module) HTTP_STATUS=NO ;;
132 --without-http_geo_module) HTTP_GEO=NO ;;
133 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
134 --without-http_proxy_module) HTTP_PROXY=NO ;;
135 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
138 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
140 --with-imap) IMAP=YES ;;
142 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
144 --with-cc=*) CC="$value" ;;
145 --with-cpp=*) CPP="$value" ;;
146 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
147 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
148 --with-cpu-opt=*) CPU="$value" ;;
149 --with-debug) NGX_DEBUG=YES ;;
151 --without-pcre) USE_PCRE=DISABLED ;;
152 --with-pcre=*) PCRE="$value" ;;
153 --with-pcre-opt=*) PCRE_OPT="$value" ;;
155 --with-openssl=*) OPENSSL="$value" ;;
157 --with-md5=*) MD5="$value" ;;
158 --with-md5-opt=*) MD5_OPT="$value" ;;
159 --with-md5-asm) MD5_ASM=YES ;;
161 --with-zlib=*) ZLIB="$value" ;;
162 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
163 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
165 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
166 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
167 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
168 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
171 echo "$0: error: invalid option \"$option\""
178 if [ $help = yes ]; then
184 --prefix=PATH set the installation prefix
185 --sbin-path=PATH set path to the nginx binary file
186 --conf-path=PATH set path to the nginx.conf file
187 --error-log-path=PATH set path to the error log
188 --pid-path=PATH set path to nginx.pid file
190 --user=USER set non-privilege user
191 for the worker processes
192 --group=GROUP set non-privilege group
193 for the worker processes
195 --builddir=DIR set the build directory
197 --with-rtsig_module enable rtsig module
198 --with-select_module enable select module
199 --without-select_module disable select module
200 --with-poll_module enable poll module
201 --without-poll_module disable poll module
203 --with-http_ssl_module enable ngx_http_ssl_module
204 --without-http_charset_module disable ngx_http_charset_module
205 --without-http_gzip_module disable ngx_http_gzip_module
206 --without-http_userid_module disable ngx_http_userid_module
207 --without-http_access_module disable ngx_http_access_module
208 --without-http_autoindex_module disable ngx_http_autoindex_module
209 --without-http_geo_module disable ngx_http_geo_module
210 --without-http_rewrite_module disable ngx_http_rewrite_module
211 --without-http_proxy_module disable ngx_http_proxy_module
212 --without-http_fastcgi_module disable ngx_http_fastcgi_module
214 --http-log-path=PATH set path to the http access log
215 --http-client-body-temp-path=PATH set path to the http client request body
217 --http-proxy-temp-path=PATH set path to the http proxy temporary
219 --http-fastcgi-temp-path=PATH set path to the http fastcgi temporary
222 --with-cc=PATH set path to C compiler
223 --with-cpp=PATH set path to C preprocessor
224 --with-cc-opt=OPTIONS set additional options for C compiler
225 --with-ld-opt=OPTIONS set additional options for linker
226 --with-cpu-opt=CPU build for specified CPU, the valid values:
227 pentium, pentiumpro, pentium4, sparc64
229 --without-pcre disable PCRE libarary usage
230 --with-pcre=DIR set path to PCRE library sources
231 --with-pcre-opt=OPTIONS set additional options for PCRE building
233 --with-md5=DIR set path to md5 library sources
234 --with-md5-opt=OPTIONS set additional options for md5 building
235 --with-md5-asm use md5 assembler sources
237 --with-zlib=DIR set path to zlib library sources
238 --with-zlib-opt=OPTIONS set additional options for zlib building
239 --with-zlib-asm=CPU use zlib assembler sources optimized
240 for specified CPU, the valid values:
243 --with-openssl=DIR set path to OpenSSL library sources
245 --with-debug enable the debugging logging
253 if [ $HTTP = NO ]; then
266 if [ ".$NGX_PLATFORM" = ".win32" ]; then
271 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
274 case ".$NGX_SBIN_PATH" in
279 NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
283 NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
288 case ".$NGX_CONF_PATH" in
293 NGX_CONF_PATH=$NGX_PREFIX/conf/nginx.conf
297 NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
302 case ".$NGX_PID_PATH" in
307 NGX_PID_PATH=$NGX_PREFIX/logs/nginx.pid
311 NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
316 case ".$NGX_ERROR_LOG_PATH" in
321 NGX_ERROR_LOG_PATH=$NGX_PREFIX/logs/error.log
329 NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
334 case ".$NGX_HTTP_LOG_PATH" in
339 NGX_HTTP_LOG_PATH=$NGX_PREFIX/logs/access.log
343 NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
348 case ".$NGX_HTTP_CLIENT_TEMP_PATH" in
353 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp
357 NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH
362 case ".$NGX_HTTP_PROXY_TEMP_PATH" in
367 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp
371 NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH
376 case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in
381 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp
385 NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH