nginx 0.1.19
[nginx-catap.git] / auto / options
blobdd740fef336e46308effa53458ae1ecb19e40bdf
2 # Copyright (C) Igor Sysoev
5 help=no
7 NGX_PREFIX=
8 NGX_SBIN_PATH=
9 NGX_CONF_PATH=
10 NGX_ERROR_LOG_PATH=
11 NGX_PID_PATH=
12 NGX_USER=
13 NGX_GROUP=
15 CC=${CC:-gcc}
16 CPP=
17 NGX_OBJS=objs
19 NGX_DEBUG=NO
20 NGX_CC_OPT=
21 NGX_LD_OPT=
22 CPU=NO
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
29 NGX_PLATFORM=
30 NGX_WINE=
32 EVENT_FOUND=NO
34 EVENT_RTSIG=NO
35 EVENT_SELECT=NO
36 EVENT_POLL=NO
37 EVENT_AIO=NO
39 USE_THREADS=NO
41 HTTP=YES
43 NGX_HTTP_LOG_PATH=
44 NGX_HTTP_CLIENT_TEMP_PATH=
45 NGX_HTTP_PROXY_TEMP_PATH=
46 NGX_HTTP_FASTCGI_TEMP_PATH=
48 HTTP_CHARSET=YES
49 HTTP_GZIP=YES
50 HTTP_SSL=NO
51 HTTP_SSI=NO
52 HTTP_ACCESS=YES
53 HTTP_USERID=YES
54 HTTP_AUTOINDEX=YES
55 HTTP_STATUS=NO
56 HTTP_GEO=YES
57 HTTP_REWRITE=YES
58 HTTP_PROXY=YES
59 HTTP_FASTCGI=YES
61 # STUB
62 HTTP_STUB_STATUS=NO
64 IMAP=NO
66 NGX_ADDONS=
68 USE_PCRE=NO
69 PCRE=NONE
70 PCRE_OPT=
72 USE_OPENSSL=NO
73 OPENSSL=NONE
75 USE_MD5=NO
76 MD5=NONE
77 MD5_OPT=
78 MD5_ASM=NO
80 USE_ZLIB=NO
81 ZLIB=NONE
82 ZLIB_OPT=
83 ZLIB_ASM=NO
86 for option
88     case "$option" in
89         -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
90            *) value="" ;;
91     esac
93     case "$option" in
94         --help)                          help=yes                   ;;
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            ;;
137         # STUB
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 ;;
170         *)
171             echo "$0: error: invalid option \"$option\""
172             exit 1
173         ;;
174     esac
175 done
178 if [ $help = yes ]; then
180 cat << END
182   --help                             this message
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
216                                      temporary files path
217   --http-proxy-temp-path=PATH        set path to the http proxy temporary
218                                      files path
219   --http-fastcgi-temp-path=PATH      set path to the http fastcgi temporary
220                                      files path
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:
241                                      pentium, pentiumpro
243   --with-openssl=DIR                 set path to OpenSSL library sources
245   --with-debug                       enable the debugging logging
249     exit 1
253 if [ $HTTP = NO ]; then
254     HTTP_CHARSET=NO
255     HTTP_GZIP=NO
256     HTTP_SSI=NO
257     HTTP_USERID=NO
258     HTTP_ACCESS=NO
259     HTTP_STATUS=NO
260     HTTP_REWRITE=NO
261     HTTP_PROXY=NO
262     HTTP_FASTCGI=NO
266 if [ ".$NGX_PLATFORM" = ".win32" ]; then
267     NGX_WINE=$WINE
271 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
274 case ".$NGX_SBIN_PATH" in
275     ./*)
276     ;;
278     .)
279         NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
280     ;;
282     *)
283         NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
284     ;;
285 esac
288 case ".$NGX_CONF_PATH" in
289     ./*)
290     ;;
292     .)
293         NGX_CONF_PATH=$NGX_PREFIX/conf/nginx.conf
294     ;;
296     *)
297         NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
298     ;;
299 esac
302 case ".$NGX_PID_PATH" in
303     ./*)
304     ;;
306     .)
307         NGX_PID_PATH=$NGX_PREFIX/logs/nginx.pid
308     ;;
310     *)
311         NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
312     ;;
313 esac
316 case ".$NGX_ERROR_LOG_PATH" in
317     ./*)
318     ;;
320     .)
321         NGX_ERROR_LOG_PATH=$NGX_PREFIX/logs/error.log
322     ;;
324     .stderr)
325         NGX_ERROR_LOG_PATH=
326     ;;
328     *)
329         NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
330     ;;
331 esac
334 case ".$NGX_HTTP_LOG_PATH" in
335     ./*)
336     ;;
338     .)
339         NGX_HTTP_LOG_PATH=$NGX_PREFIX/logs/access.log
340     ;;
342     *)
343         NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
344     ;;
345 esac
348 case ".$NGX_HTTP_CLIENT_TEMP_PATH" in
349     ./*)
350     ;;
352     .)
353         NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp
354     ;;
356     *)
357         NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH
358     ;;
359 esac
362 case ".$NGX_HTTP_PROXY_TEMP_PATH" in
363     ./*)
364     ;;
366     .)
367         NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp
368     ;;
370     *)
371         NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH
372     ;;
373 esac
376 case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in
377     ./*)
378     ;;
380     .)
381         NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp
382     ;;
384     *)
385         NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH
386     ;;
387 esac