blob: 6cea8c7c20002ad6746dcddf698abce481eb561e [file] [log] [blame]
Igor Sysoeva8fa0a62003-11-25 20:44:56 +00001
Igor Sysoevff8da912004-09-29 16:00:49 +00002# Copyright (C) Igor Sysoev
Maxim Konovalovf8d59e32012-01-18 15:07:43 +00003# Copyright (C) Nginx, Inc.
Igor Sysoevff8da912004-09-29 16:00:49 +00004
Igor Sysoevc0edbcc2004-10-21 15:34:38 +00005
Igor Sysoevdc867cd2003-12-14 20:10:27 +00006help=no
Igor Sysoeva8fa0a62003-11-25 20:44:56 +00007
Igor Sysoevf6906042004-11-25 16:17:31 +00008NGX_PREFIX=
9NGX_SBIN_PATH=
Igor Sysoeva1df4162007-07-29 18:05:45 +000010NGX_CONF_PREFIX=
Igor Sysoevf6906042004-11-25 16:17:31 +000011NGX_CONF_PATH=
12NGX_ERROR_LOG_PATH=
13NGX_PID_PATH=
Igor Sysoevffe71442006-02-08 15:33:12 +000014NGX_LOCK_PATH=
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000015NGX_USER=
16NGX_GROUP=
Igor Sysoev090849d2004-05-18 20:28:54 +000017
Gleb Smirnoff35c17ea2013-02-18 11:35:28 +000018CC=${CC:-cc}
Igor Sysoeva893eab2004-03-11 21:34:52 +000019CPP=
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000020NGX_OBJS=objs
Igor Sysoeva8fa0a62003-11-25 20:44:56 +000021
Igor Sysoevf6906042004-11-25 16:17:31 +000022NGX_DEBUG=NO
Igor Sysoevc0edbcc2004-10-21 15:34:38 +000023NGX_CC_OPT=
24NGX_LD_OPT=
Igor Sysoev7b908342004-03-10 20:56:39 +000025CPU=NO
Igor Sysoev24b56c92004-03-10 17:55:19 +000026
Igor Sysoev274b63e2007-09-19 12:14:05 +000027NGX_RPATH=NO
28
Igor Sysoevf6906042004-11-25 16:17:31 +000029NGX_TEST_BUILD_DEVPOLL=NO
Igor Sysoev4524fb02006-09-26 12:20:12 +000030NGX_TEST_BUILD_EVENTPORT=NO
Igor Sysoevf6906042004-11-25 16:17:31 +000031NGX_TEST_BUILD_EPOLL=NO
32NGX_TEST_BUILD_RTSIG=NO
Igor Sysoev42b12b32004-12-02 18:40:46 +000033NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
Igor Sysoeva8fa0a62003-11-25 20:44:56 +000034
Igor Sysoevf6906042004-11-25 16:17:31 +000035NGX_PLATFORM=
Igor Sysoev1b735832004-11-11 14:07:14 +000036NGX_WINE=
37
Igor Sysoeva4b16df2004-02-02 21:19:52 +000038EVENT_FOUND=NO
39
Igor Sysoev9139cd22004-02-17 17:53:12 +000040EVENT_RTSIG=NO
Igor Sysoeva4b16df2004-02-02 21:19:52 +000041EVENT_SELECT=NO
42EVENT_POLL=NO
43EVENT_AIO=NO
Igor Sysoev5c8c52f2004-01-23 09:26:18 +000044
Igor Sysoevb54698b2004-02-23 20:57:12 +000045USE_THREADS=NO
46
Igor Sysoeva9625062009-08-28 08:12:35 +000047NGX_FILE_AIO=NO
Igor Sysoeva35eacc2009-02-21 07:02:02 +000048NGX_IPV6=NO
49
Igor Sysoev980a9242004-09-05 19:54:02 +000050HTTP=YES
Igor Sysoev02025fd2005-01-18 13:03:58 +000051
52NGX_HTTP_LOG_PATH=
53NGX_HTTP_CLIENT_TEMP_PATH=
54NGX_HTTP_PROXY_TEMP_PATH=
55NGX_HTTP_FASTCGI_TEMP_PATH=
Igor Sysoeve45b8922010-06-01 17:44:51 +000056NGX_HTTP_UWSGI_TEMP_PATH=
Igor Sysoevee5f9e52010-06-18 15:51:14 +000057NGX_HTTP_SCGI_TEMP_PATH=
Igor Sysoev02025fd2005-01-18 13:03:58 +000058
Igor Sysoev52859f22009-03-23 13:14:51 +000059HTTP_CACHE=YES
Igor Sysoev3d5c0fc2004-06-22 16:43:09 +000060HTTP_CHARSET=YES
Igor Sysoeva8fa0a62003-11-25 20:44:56 +000061HTTP_GZIP=YES
Igor Sysoev75569452004-07-08 15:17:47 +000062HTTP_SSL=NO
Valentin Bartenev2686cb42013-03-20 10:36:57 +000063HTTP_SPDY=NO
Igor Sysoev11d75322005-03-01 15:20:36 +000064HTTP_SSI=YES
Igor Sysoev899b44e2005-05-12 14:58:06 +000065HTTP_POSTPONE=NO
Igor Sysoev09c684b2005-11-09 17:25:55 +000066HTTP_REALIP=NO
Igor Sysoev1ae389d2008-08-04 14:48:15 +000067HTTP_XSLT=NO
Igor Sysoeve2ada612009-05-01 18:42:09 +000068HTTP_IMAGE_FILTER=NO
Igor Sysoevd9bb8e32007-04-19 17:54:23 +000069HTTP_SUB=NO
Igor Sysoev6d16e1e2006-04-05 13:40:54 +000070HTTP_ADDITION=NO
Igor Sysoev8a2b2fb2006-04-14 09:53:38 +000071HTTP_DAV=NO
Igor Sysoev59f3aa32004-06-24 16:07:04 +000072HTTP_ACCESS=YES
Igor Sysoev4d656dc2005-03-22 16:02:46 +000073HTTP_AUTH_BASIC=YES
Maxim Dounin4c53a382013-08-21 19:19:47 +040074HTTP_AUTH_REQUEST=NO
Igor Sysoev967fd632004-08-27 15:40:59 +000075HTTP_USERID=YES
Igor Sysoev723e6cc2004-10-25 15:29:23 +000076HTTP_AUTOINDEX=YES
Igor Sysoev2e2b81d2008-09-05 15:45:55 +000077HTTP_RANDOM_INDEX=NO
Igor Sysoev6d2a14a2004-09-27 16:03:21 +000078HTTP_STATUS=NO
Igor Sysoev805d9db2005-02-03 19:33:37 +000079HTTP_GEO=YES
Igor Sysoevbc101472009-07-20 07:10:43 +000080HTTP_GEOIP=NO
Igor Sysoev24025022005-12-16 15:07:08 +000081HTTP_MAP=YES
Igor Sysoevfadd4bd2010-05-14 09:02:10 +000082HTTP_SPLIT_CLIENTS=YES
Igor Sysoev0e5dc5c2005-11-15 13:30:52 +000083HTTP_REFERER=YES
Igor Sysoevc83f6832004-06-24 07:53:37 +000084HTTP_REWRITE=YES
Igor Sysoeva8fa0a62003-11-25 20:44:56 +000085HTTP_PROXY=YES
Igor Sysoev02025fd2005-01-18 13:03:58 +000086HTTP_FASTCGI=YES
Igor Sysoev3a881d32010-06-01 15:53:11 +000087HTTP_UWSGI=YES
Igor Sysoevee5f9e52010-06-18 15:51:14 +000088HTTP_SCGI=YES
Igor Sysoev9bf11aa2006-01-16 14:56:53 +000089HTTP_PERL=NO
Igor Sysoevc31a9bb2005-11-26 10:11:11 +000090HTTP_MEMCACHED=YES
Valentin Bartenev255e20a2011-11-14 14:04:42 +000091HTTP_LIMIT_CONN=YES
Igor Sysoevabe378e2008-11-10 15:22:33 +000092HTTP_LIMIT_REQ=YES
Igor Sysoev0e5dc5c2005-11-15 13:30:52 +000093HTTP_EMPTY_GIF=YES
Igor Sysoev3383ff62006-09-18 12:25:07 +000094HTTP_BROWSER=YES
Igor Sysoeve52991e2008-09-27 13:22:10 +000095HTTP_SECURE_LINK=NO
Igor Sysoev49851092009-11-16 12:20:00 +000096HTTP_DEGRADATION=NO
Igor Sysoevb5050062006-10-09 14:17:36 +000097HTTP_FLV=NO
Igor Sysoevdde4d7e2011-09-09 10:22:34 +000098HTTP_MP4=NO
Maxim Dounin90bd33e2012-09-10 16:52:47 +000099HTTP_GUNZIP=NO
Igor Sysoevc16b0052007-12-27 14:21:59 +0000100HTTP_GZIP_STATIC=NO
Igor Sysoev3d2fd182006-12-04 16:46:13 +0000101HTTP_UPSTREAM_IP_HASH=YES
Maxim Dounin4cb4e8d2012-06-03 23:21:26 +0000102HTTP_UPSTREAM_LEAST_CONN=YES
Maxim Dounin44002e52011-09-15 19:28:18 +0000103HTTP_UPSTREAM_KEEPALIVE=YES
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000104
Igor Sysoevaa828612005-02-09 14:31:07 +0000105# STUB
106HTTP_STUB_STATUS=NO
107
Igor Sysoev02c8d182007-03-19 13:36:56 +0000108MAIL=NO
109MAIL_SSL=NO
Igor Sysoev48714082007-09-15 16:51:16 +0000110MAIL_POP3=YES
111MAIL_IMAP=YES
112MAIL_SMTP=YES
Igor Sysoev59cf56c2004-09-07 15:29:22 +0000113
Igor Sysoev1ebfead2005-02-16 13:40:36 +0000114NGX_ADDONS=
Igor Sysoevd43bee82004-11-20 19:52:20 +0000115
Igor Sysoeve9b2cb12004-02-09 20:47:18 +0000116USE_PCRE=NO
Igor Sysoev43c3cd92004-02-19 08:45:27 +0000117PCRE=NONE
Igor Sysoeva893eab2004-03-11 21:34:52 +0000118PCRE_OPT=
Valentin Bartenevbc5191c2011-12-26 13:10:36 +0000119PCRE_CONF_OPT=
120PCRE_JIT=NO
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000121
Igor Sysoev0599b112004-07-25 18:34:14 +0000122USE_OPENSSL=NO
123OPENSSL=NONE
124
Igor Sysoeva4b16df2004-02-02 21:19:52 +0000125USE_MD5=NO
Igor Sysoev7af6b162004-02-09 07:46:43 +0000126MD5=NONE
Igor Sysoeva893eab2004-03-11 21:34:52 +0000127MD5_OPT=
Igor Sysoev7b908342004-03-10 20:56:39 +0000128MD5_ASM=NO
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000129
Igor Sysoevafd7ec52006-05-29 17:28:12 +0000130USE_SHA1=NO
131SHA1=NONE
132SHA1_OPT=
133SHA1_ASM=NO
134
Igor Sysoeva4b16df2004-02-02 21:19:52 +0000135USE_ZLIB=NO
Igor Sysoev7af6b162004-02-09 07:46:43 +0000136ZLIB=NONE
Igor Sysoeva893eab2004-03-11 21:34:52 +0000137ZLIB_OPT=
Igor Sysoev7b908342004-03-10 20:56:39 +0000138ZLIB_ASM=NO
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000139
Igor Sysoev9bf11aa2006-01-16 14:56:53 +0000140USE_PERL=NO
141NGX_PERL=perl
142
Igor Sysoev1ae389d2008-08-04 14:48:15 +0000143USE_LIBXSLT=NO
Igor Sysoeve2ada612009-05-01 18:42:09 +0000144USE_LIBGD=NO
Igor Sysoev1ae389d2008-08-04 14:48:15 +0000145
Igor Sysoev85dd8fc2008-03-18 10:36:27 +0000146NGX_GOOGLE_PERFTOOLS=NO
Igor Sysoeve24b57a2008-08-05 19:32:50 +0000147NGX_CPP_TEST=NO
Igor Sysoev85dd8fc2008-03-18 10:36:27 +0000148
Igor Sysoev213cad82009-11-25 17:55:25 +0000149NGX_LIBATOMIC=NO
150
Igor Sysoev24025022005-12-16 15:07:08 +0000151NGX_CPU_CACHE_LINE=
152
Valentin Bartenev255e20a2011-11-14 14:04:42 +0000153NGX_POST_CONF_MSG=
154
Igor Sysoev0e60e4f2009-04-26 19:37:38 +0000155opt=
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000156
157for option
158do
Igor Sysoevcfa2ee22009-05-18 16:50:32 +0000159 opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
Igor Sysoev0e60e4f2009-04-26 19:37:38 +0000160
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000161 case "$option" in
162 -*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
163 *) value="" ;;
164 esac
165
166 case "$option" in
Igor Sysoevdc867cd2003-12-14 20:10:27 +0000167 --help) help=yes ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000168
Igor Sysoev5ef370d2009-04-27 11:32:33 +0000169 --prefix=) NGX_PREFIX="!" ;;
Igor Sysoevf6906042004-11-25 16:17:31 +0000170 --prefix=*) NGX_PREFIX="$value" ;;
171 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
172 --conf-path=*) NGX_CONF_PATH="$value" ;;
173 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
174 --pid-path=*) NGX_PID_PATH="$value" ;;
Igor Sysoevffe71442006-02-08 15:33:12 +0000175 --lock-path=*) NGX_LOCK_PATH="$value" ;;
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000176 --user=*) NGX_USER="$value" ;;
177 --group=*) NGX_GROUP="$value" ;;
Igor Sysoev090849d2004-05-18 20:28:54 +0000178
Igor Sysoevf6906042004-11-25 16:17:31 +0000179 --crossbuild=*) NGX_PLATFORM="$value" ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000180
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000181 --builddir=*) NGX_OBJS="$value" ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000182
Igor Sysoev9139cd22004-02-17 17:53:12 +0000183 --with-rtsig_module) EVENT_RTSIG=YES ;;
Igor Sysoeva4b16df2004-02-02 21:19:52 +0000184 --with-select_module) EVENT_SELECT=YES ;;
Igor Sysoeve9b2cb12004-02-09 20:47:18 +0000185 --without-select_module) EVENT_SELECT=NONE ;;
Igor Sysoeva4b16df2004-02-02 21:19:52 +0000186 --with-poll_module) EVENT_POLL=YES ;;
Igor Sysoeve9b2cb12004-02-09 20:47:18 +0000187 --without-poll_module) EVENT_POLL=NONE ;;
Igor Sysoeva4b16df2004-02-02 21:19:52 +0000188 --with-aio_module) EVENT_AIO=YES ;;
Igor Sysoev5c8c52f2004-01-23 09:26:18 +0000189
Igor Sysoev84433602008-04-29 09:27:55 +0000190 #--with-threads=*) USE_THREADS="$value" ;;
191 #--with-threads) USE_THREADS="pthreads" ;;
Igor Sysoevb54698b2004-02-23 20:57:12 +0000192
Igor Sysoeva9625062009-08-28 08:12:35 +0000193 --with-file-aio) NGX_FILE_AIO=YES ;;
Igor Sysoeva35eacc2009-02-21 07:02:02 +0000194 --with-ipv6) NGX_IPV6=YES ;;
195
Igor Sysoev980a9242004-09-05 19:54:02 +0000196 --without-http) HTTP=NO ;;
Igor Sysoev52859f22009-03-23 13:14:51 +0000197 --without-http-cache) HTTP_CACHE=NO ;;
198
Igor Sysoevf6906042004-11-25 16:17:31 +0000199 --http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
Igor Sysoev02025fd2005-01-18 13:03:58 +0000200 --http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
201 --http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
202 --http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
Igor Sysoeve45b8922010-06-01 17:44:51 +0000203 --http-uwsgi-temp-path=*) NGX_HTTP_UWSGI_TEMP_PATH="$value" ;;
Igor Sysoevee5f9e52010-06-18 15:51:14 +0000204 --http-scgi-temp-path=*) NGX_HTTP_SCGI_TEMP_PATH="$value" ;;
Igor Sysoev980a9242004-09-05 19:54:02 +0000205
Igor Sysoev75569452004-07-08 15:17:47 +0000206 --with-http_ssl_module) HTTP_SSL=YES ;;
Valentin Bartenev2686cb42013-03-20 10:36:57 +0000207 --with-http_spdy_module) HTTP_SPDY=YES ;;
Igor Sysoev09c684b2005-11-09 17:25:55 +0000208 --with-http_realip_module) HTTP_REALIP=YES ;;
Igor Sysoev6d16e1e2006-04-05 13:40:54 +0000209 --with-http_addition_module) HTTP_ADDITION=YES ;;
Igor Sysoev1ae389d2008-08-04 14:48:15 +0000210 --with-http_xslt_module) HTTP_XSLT=YES ;;
Igor Sysoeve2ada612009-05-01 18:42:09 +0000211 --with-http_image_filter_module) HTTP_IMAGE_FILTER=YES ;;
Igor Sysoevbc101472009-07-20 07:10:43 +0000212 --with-http_geoip_module) HTTP_GEOIP=YES ;;
Igor Sysoevd9bb8e32007-04-19 17:54:23 +0000213 --with-http_sub_module) HTTP_SUB=YES ;;
Igor Sysoev8a2b2fb2006-04-14 09:53:38 +0000214 --with-http_dav_module) HTTP_DAV=YES ;;
Igor Sysoevb5050062006-10-09 14:17:36 +0000215 --with-http_flv_module) HTTP_FLV=YES ;;
Igor Sysoevdde4d7e2011-09-09 10:22:34 +0000216 --with-http_mp4_module) HTTP_MP4=YES ;;
Maxim Dounin90bd33e2012-09-10 16:52:47 +0000217 --with-http_gunzip_module) HTTP_GUNZIP=YES ;;
Igor Sysoevc16b0052007-12-27 14:21:59 +0000218 --with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
Maxim Dounin4c53a382013-08-21 19:19:47 +0400219 --with-http_auth_request_module) HTTP_AUTH_REQUEST=YES ;;
Igor Sysoev2e2b81d2008-09-05 15:45:55 +0000220 --with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
Igor Sysoeve52991e2008-09-27 13:22:10 +0000221 --with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
Igor Sysoev49851092009-11-16 12:20:00 +0000222 --with-http_degradation_module) HTTP_DEGRADATION=YES ;;
Igor Sysoev8a2b2fb2006-04-14 09:53:38 +0000223
Igor Sysoev3d5c0fc2004-06-22 16:43:09 +0000224 --without-http_charset_module) HTTP_CHARSET=NO ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000225 --without-http_gzip_module) HTTP_GZIP=NO ;;
Igor Sysoev75569452004-07-08 15:17:47 +0000226 --without-http_ssi_module) HTTP_SSI=NO ;;
Igor Sysoev967fd632004-08-27 15:40:59 +0000227 --without-http_userid_module) HTTP_USERID=NO ;;
Igor Sysoeva7c4a2a2004-08-29 03:55:41 +0000228 --without-http_access_module) HTTP_ACCESS=NO ;;
Igor Sysoev4d656dc2005-03-22 16:02:46 +0000229 --without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
Igor Sysoev723e6cc2004-10-25 15:29:23 +0000230 --without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
Igor Sysoevc83f6832004-06-24 07:53:37 +0000231 --without-http_status_module) HTTP_STATUS=NO ;;
Igor Sysoev805d9db2005-02-03 19:33:37 +0000232 --without-http_geo_module) HTTP_GEO=NO ;;
Igor Sysoev24025022005-12-16 15:07:08 +0000233 --without-http_map_module) HTTP_MAP=NO ;;
Igor Sysoevfadd4bd2010-05-14 09:02:10 +0000234 --without-http_split_clients_module) HTTP_SPLIT_CLIENTS=NO ;;
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000235 --without-http_referer_module) HTTP_REFERER=NO ;;
Igor Sysoevc83f6832004-06-24 07:53:37 +0000236 --without-http_rewrite_module) HTTP_REWRITE=NO ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000237 --without-http_proxy_module) HTTP_PROXY=NO ;;
Igor Sysoev02025fd2005-01-18 13:03:58 +0000238 --without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
Igor Sysoev3a881d32010-06-01 15:53:11 +0000239 --without-http_uwsgi_module) HTTP_UWSGI=NO ;;
Igor Sysoevee5f9e52010-06-18 15:51:14 +0000240 --without-http_scgi_module) HTTP_SCGI=NO ;;
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000241 --without-http_memcached_module) HTTP_MEMCACHED=NO ;;
Valentin Bartenev255e20a2011-11-14 14:04:42 +0000242 --without-http_limit_zone_module)
243 HTTP_LIMIT_CONN=NO
244 NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
245$0: warning: the \"--without-http_limit_zone_module\" option is deprecated, \
246use the \"--without-http_limit_conn_module\" option instead"
247 ;;
248 --without-http_limit_conn_module) HTTP_LIMIT_CONN=NO ;;
Igor Sysoevabe378e2008-11-10 15:22:33 +0000249 --without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000250 --without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
Igor Sysoev3383ff62006-09-18 12:25:07 +0000251 --without-http_browser_module) HTTP_BROWSER=NO ;;
Igor Sysoev3d2fd182006-12-04 16:46:13 +0000252 --without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
Maxim Dounin4cb4e8d2012-06-03 23:21:26 +0000253 --without-http_upstream_least_conn_module)
254 HTTP_UPSTREAM_LEAST_CONN=NO ;;
Maxim Dounin44002e52011-09-15 19:28:18 +0000255 --without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000256
Igor Sysoev9bf11aa2006-01-16 14:56:53 +0000257 --with-http_perl_module) HTTP_PERL=YES ;;
258 --with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
259 --with-perl=*) NGX_PERL="$value" ;;
260
Igor Sysoevaa828612005-02-09 14:31:07 +0000261 # STUB
262 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
263
Igor Sysoev02c8d182007-03-19 13:36:56 +0000264 --with-mail) MAIL=YES ;;
265 --with-mail_ssl_module) MAIL_SSL=YES ;;
266 # STUB
267 --with-imap) MAIL=YES ;;
268 --with-imap_ssl_module) MAIL_SSL=YES ;;
Igor Sysoev48714082007-09-15 16:51:16 +0000269 --without-mail_pop3_module) MAIL_POP3=NO ;;
270 --without-mail_imap_module) MAIL_IMAP=NO ;;
271 --without-mail_smtp_module) MAIL_SMTP=NO ;;
Igor Sysoev59cf56c2004-09-07 15:29:22 +0000272
Igor Sysoev85dd8fc2008-03-18 10:36:27 +0000273 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
Igor Sysoev49f06852008-08-13 08:29:27 +0000274 --with-cpp_test_module) NGX_CPP_TEST=YES ;;
Igor Sysoev85dd8fc2008-03-18 10:36:27 +0000275
Igor Sysoev1ebfead2005-02-16 13:40:36 +0000276 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
Igor Sysoevd43bee82004-11-20 19:52:20 +0000277
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000278 --with-cc=*) CC="$value" ;;
Igor Sysoeva893eab2004-03-11 21:34:52 +0000279 --with-cpp=*) CPP="$value" ;;
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000280 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
281 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
Igor Sysoev7b908342004-03-10 20:56:39 +0000282 --with-cpu-opt=*) CPU="$value" ;;
Igor Sysoevf6906042004-11-25 16:17:31 +0000283 --with-debug) NGX_DEBUG=YES ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000284
Igor Sysoevbb1ba3f2004-02-19 16:48:14 +0000285 --without-pcre) USE_PCRE=DISABLED ;;
Igor Sysoeve231e582009-03-19 16:06:32 +0000286 --with-pcre) USE_PCRE=YES ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000287 --with-pcre=*) PCRE="$value" ;;
Igor Sysoev7b908342004-03-10 20:56:39 +0000288 --with-pcre-opt=*) PCRE_OPT="$value" ;;
Valentin Bartenevbc5191c2011-12-26 13:10:36 +0000289 --with-pcre-jit) PCRE_JIT=YES ;;
Igor Sysoev7b908342004-03-10 20:56:39 +0000290
Igor Sysoev0599b112004-07-25 18:34:14 +0000291 --with-openssl=*) OPENSSL="$value" ;;
Igor Sysoevc1571722005-03-19 12:38:37 +0000292 --with-openssl-opt=*) OPENSSL_OPT="$value" ;;
Igor Sysoev0599b112004-07-25 18:34:14 +0000293
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000294 --with-md5=*) MD5="$value" ;;
Igor Sysoev7b908342004-03-10 20:56:39 +0000295 --with-md5-opt=*) MD5_OPT="$value" ;;
296 --with-md5-asm) MD5_ASM=YES ;;
297
Igor Sysoevafd7ec52006-05-29 17:28:12 +0000298 --with-sha1=*) SHA1="$value" ;;
299 --with-sha1-opt=*) SHA1_OPT="$value" ;;
300 --with-sha1-asm) SHA1_ASM=YES ;;
301
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000302 --with-zlib=*) ZLIB="$value" ;;
Igor Sysoev24b56c92004-03-10 17:55:19 +0000303 --with-zlib-opt=*) ZLIB_OPT="$value" ;;
Igor Sysoev7b908342004-03-10 20:56:39 +0000304 --with-zlib-asm=*) ZLIB_ASM="$value" ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000305
Igor Sysoev213cad82009-11-25 17:55:25 +0000306 --with-libatomic) NGX_LIBATOMIC=YES ;;
307 --with-libatomic=*) NGX_LIBATOMIC="$value" ;;
308
Igor Sysoevf6906042004-11-25 16:17:31 +0000309 --test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
Igor Sysoev4524fb02006-09-26 12:20:12 +0000310 --test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
Igor Sysoevf6906042004-11-25 16:17:31 +0000311 --test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
312 --test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
Igor Sysoev42b12b32004-12-02 18:40:46 +0000313 --test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000314
315 *)
316 echo "$0: error: invalid option \"$option\""
317 exit 1
318 ;;
319 esac
320done
321
322
Igor Sysoev0e60e4f2009-04-26 19:37:38 +0000323NGX_CONFIGURE="$opt"
324
325
Igor Sysoevdc867cd2003-12-14 20:10:27 +0000326if [ $help = yes ]; then
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000327
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000328cat << END
Igor Sysoev5c8c52f2004-01-23 09:26:18 +0000329
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000330 --help print this message
Igor Sysoev5c8c52f2004-01-23 09:26:18 +0000331
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000332 --prefix=PATH set installation prefix
333 --sbin-path=PATH set nginx binary pathname
334 --conf-path=PATH set nginx.conf pathname
335 --error-log-path=PATH set error log pathname
336 --pid-path=PATH set nginx.pid pathname
337 --lock-path=PATH set nginx.lock pathname
Igor Sysoev5c8c52f2004-01-23 09:26:18 +0000338
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000339 --user=USER set non-privileged user for
340 worker processes
341 --group=GROUP set non-privileged group for
342 worker processes
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000343
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000344 --builddir=DIR set build directory
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000345
Igor Sysoev02025fd2005-01-18 13:03:58 +0000346 --with-rtsig_module enable rtsig module
347 --with-select_module enable select module
348 --without-select_module disable select module
349 --with-poll_module enable poll module
350 --without-poll_module disable poll module
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000351
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000352 --with-file-aio enable file AIO support
353 --with-ipv6 enable IPv6 support
Igor Sysoeva35eacc2009-02-21 07:02:02 +0000354
Igor Sysoev02025fd2005-01-18 13:03:58 +0000355 --with-http_ssl_module enable ngx_http_ssl_module
Valentin Bartenev2686cb42013-03-20 10:36:57 +0000356 --with-http_spdy_module enable ngx_http_spdy_module
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000357 --with-http_realip_module enable ngx_http_realip_module
Igor Sysoevcdf609a2006-04-17 19:55:41 +0000358 --with-http_addition_module enable ngx_http_addition_module
Igor Sysoev1ae389d2008-08-04 14:48:15 +0000359 --with-http_xslt_module enable ngx_http_xslt_module
Igor Sysoev59eed352009-05-01 19:14:10 +0000360 --with-http_image_filter_module enable ngx_http_image_filter_module
Igor Sysoev16137b02009-07-21 13:27:19 +0000361 --with-http_geoip_module enable ngx_http_geoip_module
Igor Sysoevd9bb8e32007-04-19 17:54:23 +0000362 --with-http_sub_module enable ngx_http_sub_module
Igor Sysoevcdf609a2006-04-17 19:55:41 +0000363 --with-http_dav_module enable ngx_http_dav_module
Igor Sysoevb5050062006-10-09 14:17:36 +0000364 --with-http_flv_module enable ngx_http_flv_module
Igor Sysoevdde4d7e2011-09-09 10:22:34 +0000365 --with-http_mp4_module enable ngx_http_mp4_module
Maxim Dounin90bd33e2012-09-10 16:52:47 +0000366 --with-http_gunzip_module enable ngx_http_gunzip_module
Igor Sysoevc16b0052007-12-27 14:21:59 +0000367 --with-http_gzip_static_module enable ngx_http_gzip_static_module
Maxim Dounin4c53a382013-08-21 19:19:47 +0400368 --with-http_auth_request_module enable ngx_http_auth_request_module
Igor Sysoev2e2b81d2008-09-05 15:45:55 +0000369 --with-http_random_index_module enable ngx_http_random_index_module
Igor Sysoeve52991e2008-09-27 13:22:10 +0000370 --with-http_secure_link_module enable ngx_http_secure_link_module
Igor Sysoev49851092009-11-16 12:20:00 +0000371 --with-http_degradation_module enable ngx_http_degradation_module
Igor Sysoev60e84402007-05-01 19:55:25 +0000372 --with-http_stub_status_module enable ngx_http_stub_status_module
Igor Sysoevcdf609a2006-04-17 19:55:41 +0000373
Igor Sysoev02025fd2005-01-18 13:03:58 +0000374 --without-http_charset_module disable ngx_http_charset_module
375 --without-http_gzip_module disable ngx_http_gzip_module
Igor Sysoevc1571722005-03-19 12:38:37 +0000376 --without-http_ssi_module disable ngx_http_ssi_module
Igor Sysoev02025fd2005-01-18 13:03:58 +0000377 --without-http_userid_module disable ngx_http_userid_module
378 --without-http_access_module disable ngx_http_access_module
Igor Sysoev4d656dc2005-03-22 16:02:46 +0000379 --without-http_auth_basic_module disable ngx_http_auth_basic_module
Igor Sysoev02025fd2005-01-18 13:03:58 +0000380 --without-http_autoindex_module disable ngx_http_autoindex_module
Igor Sysoev805d9db2005-02-03 19:33:37 +0000381 --without-http_geo_module disable ngx_http_geo_module
Igor Sysoev347f7fe2006-09-26 21:15:02 +0000382 --without-http_map_module disable ngx_http_map_module
Igor Sysoevfadd4bd2010-05-14 09:02:10 +0000383 --without-http_split_clients_module disable ngx_http_split_clients_module
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000384 --without-http_referer_module disable ngx_http_referer_module
Igor Sysoev02025fd2005-01-18 13:03:58 +0000385 --without-http_rewrite_module disable ngx_http_rewrite_module
386 --without-http_proxy_module disable ngx_http_proxy_module
387 --without-http_fastcgi_module disable ngx_http_fastcgi_module
Igor Sysoev3a881d32010-06-01 15:53:11 +0000388 --without-http_uwsgi_module disable ngx_http_uwsgi_module
Igor Sysoevee5f9e52010-06-18 15:51:14 +0000389 --without-http_scgi_module disable ngx_http_scgi_module
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000390 --without-http_memcached_module disable ngx_http_memcached_module
Valentin Bartenev255e20a2011-11-14 14:04:42 +0000391 --without-http_limit_conn_module disable ngx_http_limit_conn_module
Igor Sysoevabe378e2008-11-10 15:22:33 +0000392 --without-http_limit_req_module disable ngx_http_limit_req_module
Igor Sysoevc31a9bb2005-11-26 10:11:11 +0000393 --without-http_empty_gif_module disable ngx_http_empty_gif_module
Igor Sysoev347f7fe2006-09-26 21:15:02 +0000394 --without-http_browser_module disable ngx_http_browser_module
Igor Sysoev3d2fd182006-12-04 16:46:13 +0000395 --without-http_upstream_ip_hash_module
396 disable ngx_http_upstream_ip_hash_module
Maxim Dounin8a1a54b2012-09-26 16:39:38 +0000397 --without-http_upstream_least_conn_module
398 disable ngx_http_upstream_least_conn_module
399 --without-http_upstream_keepalive_module
400 disable ngx_http_upstream_keepalive_module
Igor Sysoev02025fd2005-01-18 13:03:58 +0000401
Igor Sysoev9bf11aa2006-01-16 14:56:53 +0000402 --with-http_perl_module enable ngx_http_perl_module
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000403 --with-perl_modules_path=PATH set Perl modules path
404 --with-perl=PATH set perl binary pathname
Igor Sysoev9bf11aa2006-01-16 14:56:53 +0000405
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000406 --http-log-path=PATH set http access log pathname
407 --http-client-body-temp-path=PATH set path to store
408 http client request body temporary files
409 --http-proxy-temp-path=PATH set path to store
410 http proxy temporary files
411 --http-fastcgi-temp-path=PATH set path to store
412 http fastcgi temporary files
413 --http-uwsgi-temp-path=PATH set path to store
414 http uwsgi temporary files
415 --http-scgi-temp-path=PATH set path to store
416 http scgi temporary files
Igor Sysoev02025fd2005-01-18 13:03:58 +0000417
Igor Sysoev187b7d92005-07-14 12:51:53 +0000418 --without-http disable HTTP server
Igor Sysoev52859f22009-03-23 13:14:51 +0000419 --without-http-cache disable HTTP cache
Igor Sysoev187b7d92005-07-14 12:51:53 +0000420
Igor Sysoev884d6342007-09-21 16:14:17 +0000421 --with-mail enable POP3/IMAP4/SMTP proxy module
Igor Sysoev02c8d182007-03-19 13:36:56 +0000422 --with-mail_ssl_module enable ngx_mail_ssl_module
Igor Sysoev884d6342007-09-21 16:14:17 +0000423 --without-mail_pop3_module disable ngx_mail_pop3_module
424 --without-mail_imap_module disable ngx_mail_imap_module
425 --without-mail_smtp_module disable ngx_mail_smtp_module
Igor Sysoev187b7d92005-07-14 12:51:53 +0000426
Igor Sysoev85dd8fc2008-03-18 10:36:27 +0000427 --with-google_perftools_module enable ngx_google_perftools_module
Igor Sysoeve24b57a2008-08-05 19:32:50 +0000428 --with-cpp_test_module enable ngx_cpp_test_module
Igor Sysoev85dd8fc2008-03-18 10:36:27 +0000429
Igor Sysoev60e84402007-05-01 19:55:25 +0000430 --add-module=PATH enable an external module
431
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000432 --with-cc=PATH set C compiler pathname
433 --with-cpp=PATH set C preprocessor pathname
434 --with-cc-opt=OPTIONS set additional C compiler options
435 --with-ld-opt=OPTIONS set additional linker options
436 --with-cpu-opt=CPU build for the specified CPU, valid values:
Igor Sysoevc2807ec2006-02-16 15:26:46 +0000437 pentium, pentiumpro, pentium3, pentium4,
438 athlon, opteron, sparc32, sparc64, ppc64
Igor Sysoev02025fd2005-01-18 13:03:58 +0000439
Igor Sysoev58e19b72009-03-19 16:02:40 +0000440 --without-pcre disable PCRE library usage
Igor Sysoeve231e582009-03-19 16:06:32 +0000441 --with-pcre force PCRE library usage
Igor Sysoev02025fd2005-01-18 13:03:58 +0000442 --with-pcre=DIR set path to PCRE library sources
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000443 --with-pcre-opt=OPTIONS set additional build options for PCRE
Valentin Bartenevbc5191c2011-12-26 13:10:36 +0000444 --with-pcre-jit build PCRE with JIT compilation support
Igor Sysoev02025fd2005-01-18 13:03:58 +0000445
446 --with-md5=DIR set path to md5 library sources
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000447 --with-md5-opt=OPTIONS set additional build options for md5
Igor Sysoev02025fd2005-01-18 13:03:58 +0000448 --with-md5-asm use md5 assembler sources
449
Igor Sysoevafd7ec52006-05-29 17:28:12 +0000450 --with-sha1=DIR set path to sha1 library sources
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000451 --with-sha1-opt=OPTIONS set additional build options for sha1
Igor Sysoevafd7ec52006-05-29 17:28:12 +0000452 --with-sha1-asm use sha1 assembler sources
453
Igor Sysoev02025fd2005-01-18 13:03:58 +0000454 --with-zlib=DIR set path to zlib library sources
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000455 --with-zlib-opt=OPTIONS set additional build options for zlib
Igor Sysoev02025fd2005-01-18 13:03:58 +0000456 --with-zlib-asm=CPU use zlib assembler sources optimized
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000457 for the specified CPU, valid values:
Igor Sysoev02025fd2005-01-18 13:03:58 +0000458 pentium, pentiumpro
459
Igor Sysoev213cad82009-11-25 17:55:25 +0000460 --with-libatomic force libatomic_ops library usage
461 --with-libatomic=DIR set path to libatomic_ops library sources
462
Igor Sysoev02025fd2005-01-18 13:03:58 +0000463 --with-openssl=DIR set path to OpenSSL library sources
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000464 --with-openssl-opt=OPTIONS set additional build options for OpenSSL
Igor Sysoev02025fd2005-01-18 13:03:58 +0000465
Ruslan Ermilovac0e8cb2011-10-26 13:18:33 +0000466 --with-debug enable debug logging
Igor Sysoevc0edbcc2004-10-21 15:34:38 +0000467
468END
Igor Sysoeva8fa0a62003-11-25 20:44:56 +0000469
470 exit 1
471fi
Igor Sysoev732a2712004-04-21 18:54:33 +0000472
473
Igor Sysoev562626a2004-09-14 05:45:22 +0000474if [ $HTTP = NO ]; then
475 HTTP_CHARSET=NO
476 HTTP_GZIP=NO
477 HTTP_SSI=NO
478 HTTP_USERID=NO
479 HTTP_ACCESS=NO
480 HTTP_STATUS=NO
481 HTTP_REWRITE=NO
482 HTTP_PROXY=NO
Igor Sysoev02025fd2005-01-18 13:03:58 +0000483 HTTP_FASTCGI=NO
Igor Sysoev562626a2004-09-14 05:45:22 +0000484fi
485
486
Igor Sysoevf6906042004-11-25 16:17:31 +0000487if [ ".$NGX_PLATFORM" = ".win32" ]; then
Igor Sysoev1b735832004-11-11 14:07:14 +0000488 NGX_WINE=$WINE
Igor Sysoev732a2712004-04-21 18:54:33 +0000489fi
Igor Sysoev090849d2004-05-18 20:28:54 +0000490
491
Igor Sysoev5ef370d2009-04-27 11:32:33 +0000492NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
Igor Sysoev5cf4d1a2007-08-14 19:26:20 +0000493NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
Igor Sysoev5ef370d2009-04-27 11:32:33 +0000494NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
495NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
Igor Sysoev5cf4d1a2007-08-14 19:26:20 +0000496
Igor Sysoev5ef370d2009-04-27 11:32:33 +0000497if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
498 NGX_ERROR_LOG_PATH=
499else
500 NGX_ERROR_LOG_PATH=${NGX_ERROR_LOG_PATH:-logs/error.log}
501fi
Igor Sysoev5cf4d1a2007-08-14 19:26:20 +0000502
Igor Sysoev5ef370d2009-04-27 11:32:33 +0000503NGX_HTTP_LOG_PATH=${NGX_HTTP_LOG_PATH:-logs/access.log}
504NGX_HTTP_CLIENT_TEMP_PATH=${NGX_HTTP_CLIENT_TEMP_PATH:-client_body_temp}
505NGX_HTTP_PROXY_TEMP_PATH=${NGX_HTTP_PROXY_TEMP_PATH:-proxy_temp}
506NGX_HTTP_FASTCGI_TEMP_PATH=${NGX_HTTP_FASTCGI_TEMP_PATH:-fastcgi_temp}
Igor Sysoeve45b8922010-06-01 17:44:51 +0000507NGX_HTTP_UWSGI_TEMP_PATH=${NGX_HTTP_UWSGI_TEMP_PATH:-uwsgi_temp}
Igor Sysoevee5f9e52010-06-18 15:51:14 +0000508NGX_HTTP_SCGI_TEMP_PATH=${NGX_HTTP_SCGI_TEMP_PATH:-scgi_temp}
Igor Sysoev9bf11aa2006-01-16 14:56:53 +0000509
510case ".$NGX_PERL_MODULES" in
511 ./*)
512 ;;
513
514 .)
515 ;;
516
517 *)
518 NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES
519 ;;
520esac