nginx 0.7.8
[nginx-catap.git] / auto / options
blob1498243bbd86c38c6a020e4fb0ce3b22f3107021
2 # Copyright (C) Igor Sysoev
5 help=no
7 NGX_PREFIX=
8 NGX_SBIN_PATH=
9 NGX_CONF_PREFIX=
10 NGX_CONF_PATH=
11 NGX_ERROR_LOG_PATH=
12 NGX_PID_PATH=
13 NGX_LOCK_PATH=
14 NGX_USER=
15 NGX_GROUP=
17 CC=${CC:-gcc}
18 CPP=
19 NGX_OBJS=objs
21 NGX_DEBUG=NO
22 NGX_CC_OPT=
23 NGX_LD_OPT=
24 CPU=NO
26 NGX_RPATH=NO
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
34 NGX_PLATFORM=
35 NGX_WINE=
37 EVENT_FOUND=NO
39 EVENT_RTSIG=NO
40 EVENT_SELECT=NO
41 EVENT_POLL=NO
42 EVENT_AIO=NO
44 USE_THREADS=NO
46 HTTP=YES
48 NGX_HTTP_LOG_PATH=
49 NGX_HTTP_CLIENT_TEMP_PATH=
50 NGX_HTTP_PROXY_TEMP_PATH=
51 NGX_HTTP_FASTCGI_TEMP_PATH=
53 HTTP_CHARSET=YES
54 HTTP_GZIP=YES
55 HTTP_SSL=NO
56 HTTP_SSI=YES
57 HTTP_POSTPONE=NO
58 HTTP_REALIP=NO
59 HTTP_XSLT=NO
60 HTTP_SUB=NO
61 HTTP_ADDITION=NO
62 HTTP_DAV=NO
63 HTTP_ACCESS=YES
64 HTTP_AUTH_BASIC=YES
65 HTTP_USERID=YES
66 HTTP_AUTOINDEX=YES
67 HTTP_STATUS=NO
68 HTTP_GEO=YES
69 HTTP_MAP=YES
70 HTTP_REFERER=YES
71 HTTP_REWRITE=YES
72 HTTP_PROXY=YES
73 HTTP_FASTCGI=YES
74 HTTP_PERL=NO
75 HTTP_MEMCACHED=YES
76 HTTP_LIMIT_ZONE=YES
77 HTTP_EMPTY_GIF=YES
78 HTTP_BROWSER=YES
79 HTTP_FLV=NO
80 HTTP_GZIP_STATIC=NO
81 HTTP_UPSTREAM_IP_HASH=YES
83 # STUB
84 HTTP_STUB_STATUS=NO
86 MAIL=NO
87 MAIL_SSL=NO
88 MAIL_POP3=YES
89 MAIL_IMAP=YES
90 MAIL_SMTP=YES
92 NGX_ADDONS=
94 USE_PCRE=NO
95 PCRE=NONE
96 PCRE_OPT=
98 USE_OPENSSL=NO
99 OPENSSL=NONE
101 USE_MD5=NO
102 MD5=NONE
103 MD5_OPT=
104 MD5_ASM=NO
106 USE_SHA1=NO
107 SHA1=NONE
108 SHA1_OPT=
109 SHA1_ASM=NO
111 USE_ZLIB=NO
112 ZLIB=NONE
113 ZLIB_OPT=
114 ZLIB_ASM=NO
116 USE_PERL=NO
117 NGX_PERL=perl
119 USE_LIBXSLT=NO
121 NGX_GOOGLE_PERFTOOLS=NO
123 NGX_CPU_CACHE_LINE=
126 for option
128     case "$option" in
129         -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
130            *) value="" ;;
131     esac
133     case "$option" in
134         --help)                          help=yes                   ;;
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"          ;;
198         # STUB
199         --with-http_stub_status_module)  HTTP_STUB_STATUS=YES       ;;
201         --with-mail)                     MAIL=YES                   ;;
202         --with-mail_ssl_module)          MAIL_SSL=YES               ;;
203         # STUB
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 ;;
246         *)
247             echo "$0: error: invalid option \"$option\""
248             exit 1
249         ;;
250     esac
251 done
254 if [ $help = yes ]; then
256 cat << END
258   --help                             this message
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
316                                      temporary files
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
319                                      files
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:
357                                      pentium, pentiumpro
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
366     exit 1
370 if [ $HTTP = NO ]; then
371     HTTP_CHARSET=NO
372     HTTP_GZIP=NO
373     HTTP_SSI=NO
374     HTTP_USERID=NO
375     HTTP_ACCESS=NO
376     HTTP_STATUS=NO
377     HTTP_REWRITE=NO
378     HTTP_PROXY=NO
379     HTTP_FASTCGI=NO
383 if [ ".$NGX_PLATFORM" = ".win32" ]; then
384     NGX_WINE=$WINE
388 NGX_PREFIX=${NGX_PREFIX:-/usr/local/nginx}
391 case ".$NGX_SBIN_PATH" in
392     ./*)
393     ;;
395     .)
396         NGX_SBIN_PATH=$NGX_PREFIX/sbin/nginx
397     ;;
399     *)
400         NGX_SBIN_PATH=$NGX_PREFIX/$NGX_SBIN_PATH
401     ;;
402 esac
405 case ".$NGX_CONF_PATH" in
406     ./*)
407     ;;
409     .)
410         NGX_CONF_PATH=$NGX_PREFIX/conf/nginx.conf
411     ;;
413     *)
414         NGX_CONF_PATH=$NGX_PREFIX/$NGX_CONF_PATH
415     ;;
416 esac
419 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
422 case ".$NGX_PID_PATH" in
423     ./*)
424     ;;
426     .)
427         NGX_PID_PATH=$NGX_PREFIX/logs/nginx.pid
428     ;;
430     *)
431         NGX_PID_PATH=$NGX_PREFIX/$NGX_PID_PATH
432     ;;
433 esac
436 case ".$NGX_LOCK_PATH" in
437     ./*)
438     ;;
440     .)
441         NGX_LOCK_PATH=$NGX_PREFIX/logs/nginx.lock
442     ;;
444     *)
445         NGX_LOCK_PATH=$NGX_PREFIX/$NGX_LOCK_PATH
446     ;;
447 esac
450 case ".$NGX_ERROR_LOG_PATH" in
451     ./*)
452     ;;
454     .)
455         NGX_ERROR_LOG_PATH=$NGX_PREFIX/logs/error.log
456     ;;
458     .stderr)
459         NGX_ERROR_LOG_PATH=
460     ;;
462     *)
463         NGX_ERROR_LOG_PATH=$NGX_PREFIX/$NGX_ERROR_LOG_PATH
464     ;;
465 esac
468 case ".$NGX_HTTP_LOG_PATH" in
469     ./*)
470     ;;
472     .)
473         NGX_HTTP_LOG_PATH=$NGX_PREFIX/logs/access.log
474     ;;
476     *)
477         NGX_HTTP_LOG_PATH=$NGX_PREFIX/$NGX_HTTP_LOG_PATH
478     ;;
479 esac
482 case ".$NGX_HTTP_CLIENT_TEMP_PATH" in
483     ./*)
484     ;;
486     .)
487         NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/client_body_temp
488     ;;
490     *)
491         NGX_HTTP_CLIENT_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_CLIENT_TEMP_PATH
492     ;;
493 esac
496 case ".$NGX_HTTP_PROXY_TEMP_PATH" in
497     ./*)
498     ;;
500     .)
501         NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/proxy_temp
502     ;;
504     *)
505         NGX_HTTP_PROXY_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_PROXY_TEMP_PATH
506     ;;
507 esac
510 case ".$NGX_HTTP_FASTCGI_TEMP_PATH" in
511     ./*)
512     ;;
514     .)
515         NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/fastcgi_temp
516     ;;
518     *)
519         NGX_HTTP_FASTCGI_TEMP_PATH=$NGX_PREFIX/$NGX_HTTP_FASTCGI_TEMP_PATH
520     ;;
521 esac
524 case ".$NGX_PERL_MODULES" in
525     ./*)
526     ;;
528     .)
529     ;;
531     *)
532         NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES
533     ;;
534 esac