comparison auto/options @ 6383:85dea406e18f

Dynamic modules. The auto/module script is extended to understand ngx_module_link=DYNAMIC. When set, it links the module as a shared object rather than statically into nginx binary. The module can later be loaded using the "load_module" directive. New auto/module parameter ngx_module_order allows to define module loading order in complex cases. By default the order is set based on ngx_module_type. 3rd party modules can be compiled dynamically using the --add-dynamic-module configure option, which will preset ngx_module_link to "DYNAMIC" before calling the module config script. Win32 support is rudimentary, and only works when using MinGW gcc (which is able to handle exports/imports automatically). In collaboration with Ruslan Ermilov.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 04 Feb 2016 20:25:29 +0300
parents 29f35e60840b
children 39a806ccf21e
comparison
equal deleted inserted replaced
6382:392959224560 6383:85dea406e18f
5 5
6 help=no 6 help=no
7 7
8 NGX_PREFIX= 8 NGX_PREFIX=
9 NGX_SBIN_PATH= 9 NGX_SBIN_PATH=
10 NGX_MODULES_PATH=
10 NGX_CONF_PREFIX= 11 NGX_CONF_PREFIX=
11 NGX_CONF_PATH= 12 NGX_CONF_PATH=
12 NGX_ERROR_LOG_PATH= 13 NGX_ERROR_LOG_PATH=
13 NGX_PID_PATH= 14 NGX_PID_PATH=
14 NGX_LOCK_PATH= 15 NGX_LOCK_PATH=
118 STREAM_ACCESS=YES 119 STREAM_ACCESS=YES
119 STREAM_UPSTREAM_HASH=YES 120 STREAM_UPSTREAM_HASH=YES
120 STREAM_UPSTREAM_LEAST_CONN=YES 121 STREAM_UPSTREAM_LEAST_CONN=YES
121 STREAM_UPSTREAM_ZONE=YES 122 STREAM_UPSTREAM_ZONE=YES
122 123
124 DYNAMIC_MODULES=
125
123 NGX_ADDONS= 126 NGX_ADDONS=
127 NGX_ADDON_DEPS=
128 DYNAMIC_ADDONS=
124 129
125 USE_PCRE=NO 130 USE_PCRE=NO
126 PCRE=NONE 131 PCRE=NONE
127 PCRE_OPT= 132 PCRE_OPT=
128 PCRE_CONF_OPT= 133 PCRE_CONF_OPT=
149 USE_PERL=NO 154 USE_PERL=NO
150 NGX_PERL=perl 155 NGX_PERL=perl
151 156
152 USE_LIBXSLT=NO 157 USE_LIBXSLT=NO
153 USE_LIBGD=NO 158 USE_LIBGD=NO
159 USE_GEOIP=NO
154 160
155 NGX_GOOGLE_PERFTOOLS=NO 161 NGX_GOOGLE_PERFTOOLS=NO
156 NGX_CPP_TEST=NO 162 NGX_CPP_TEST=NO
157 163
158 NGX_LIBATOMIC=NO 164 NGX_LIBATOMIC=NO
176 --help) help=yes ;; 182 --help) help=yes ;;
177 183
178 --prefix=) NGX_PREFIX="!" ;; 184 --prefix=) NGX_PREFIX="!" ;;
179 --prefix=*) NGX_PREFIX="$value" ;; 185 --prefix=*) NGX_PREFIX="$value" ;;
180 --sbin-path=*) NGX_SBIN_PATH="$value" ;; 186 --sbin-path=*) NGX_SBIN_PATH="$value" ;;
187 --modules-path=*) NGX_MODULES_PATH="$value" ;;
181 --conf-path=*) NGX_CONF_PATH="$value" ;; 188 --conf-path=*) NGX_CONF_PATH="$value" ;;
182 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";; 189 --error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
183 --pid-path=*) NGX_PID_PATH="$value" ;; 190 --pid-path=*) NGX_PID_PATH="$value" ;;
184 --lock-path=*) NGX_LOCK_PATH="$value" ;; 191 --lock-path=*) NGX_LOCK_PATH="$value" ;;
185 --user=*) NGX_USER="$value" ;; 192 --user=*) NGX_USER="$value" ;;
213 --with-http_ssl_module) HTTP_SSL=YES ;; 220 --with-http_ssl_module) HTTP_SSL=YES ;;
214 --with-http_v2_module) HTTP_V2=YES ;; 221 --with-http_v2_module) HTTP_V2=YES ;;
215 --with-http_realip_module) HTTP_REALIP=YES ;; 222 --with-http_realip_module) HTTP_REALIP=YES ;;
216 --with-http_addition_module) HTTP_ADDITION=YES ;; 223 --with-http_addition_module) HTTP_ADDITION=YES ;;
217 --with-http_xslt_module) HTTP_XSLT=YES ;; 224 --with-http_xslt_module) HTTP_XSLT=YES ;;
225 --with-http_xslt_module=dynamic) HTTP_XSLT=DYNAMIC ;;
218 --with-http_image_filter_module) HTTP_IMAGE_FILTER=YES ;; 226 --with-http_image_filter_module) HTTP_IMAGE_FILTER=YES ;;
227 --with-http_image_filter_module=dynamic)
228 HTTP_IMAGE_FILTER=DYNAMIC ;;
219 --with-http_geoip_module) HTTP_GEOIP=YES ;; 229 --with-http_geoip_module) HTTP_GEOIP=YES ;;
230 --with-http_geoip_module=dynamic)
231 HTTP_GEOIP=DYNAMIC ;;
220 --with-http_sub_module) HTTP_SUB=YES ;; 232 --with-http_sub_module) HTTP_SUB=YES ;;
221 --with-http_dav_module) HTTP_DAV=YES ;; 233 --with-http_dav_module) HTTP_DAV=YES ;;
222 --with-http_flv_module) HTTP_FLV=YES ;; 234 --with-http_flv_module) HTTP_FLV=YES ;;
223 --with-http_mp4_module) HTTP_MP4=YES ;; 235 --with-http_mp4_module) HTTP_MP4=YES ;;
224 --with-http_gunzip_module) HTTP_GUNZIP=YES ;; 236 --with-http_gunzip_module) HTTP_GUNZIP=YES ;;
264 276
265 # STUB 277 # STUB
266 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;; 278 --with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
267 279
268 --with-mail) MAIL=YES ;; 280 --with-mail) MAIL=YES ;;
281 --with-mail=dynamic) MAIL=DYNAMIC ;;
269 --with-mail_ssl_module) MAIL_SSL=YES ;; 282 --with-mail_ssl_module) MAIL_SSL=YES ;;
270 # STUB 283 # STUB
271 --with-imap) 284 --with-imap)
272 MAIL=YES 285 MAIL=YES
273 NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG 286 NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
283 --without-mail_pop3_module) MAIL_POP3=NO ;; 296 --without-mail_pop3_module) MAIL_POP3=NO ;;
284 --without-mail_imap_module) MAIL_IMAP=NO ;; 297 --without-mail_imap_module) MAIL_IMAP=NO ;;
285 --without-mail_smtp_module) MAIL_SMTP=NO ;; 298 --without-mail_smtp_module) MAIL_SMTP=NO ;;
286 299
287 --with-stream) STREAM=YES ;; 300 --with-stream) STREAM=YES ;;
301 --with-stream=dynamic) STREAM=DYNAMIC ;;
288 --with-stream_ssl_module) STREAM_SSL=YES ;; 302 --with-stream_ssl_module) STREAM_SSL=YES ;;
289 --without-stream_limit_conn_module) 303 --without-stream_limit_conn_module)
290 STREAM_LIMIT_CONN=NO ;; 304 STREAM_LIMIT_CONN=NO ;;
291 --without-stream_access_module) STREAM_ACCESS=NO ;; 305 --without-stream_access_module) STREAM_ACCESS=NO ;;
292 --without-stream_upstream_hash_module) 306 --without-stream_upstream_hash_module)
298 312
299 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;; 313 --with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
300 --with-cpp_test_module) NGX_CPP_TEST=YES ;; 314 --with-cpp_test_module) NGX_CPP_TEST=YES ;;
301 315
302 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;; 316 --add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
317 --add-dynamic-module=*) DYNAMIC_ADDONS="$DYNAMIC_ADDONS $value" ;;
303 318
304 --with-cc=*) CC="$value" ;; 319 --with-cc=*) CC="$value" ;;
305 --with-cpp=*) CPP="$value" ;; 320 --with-cpp=*) CPP="$value" ;;
306 --with-cc-opt=*) NGX_CC_OPT="$value" ;; 321 --with-cc-opt=*) NGX_CC_OPT="$value" ;;
307 --with-ld-opt=*) NGX_LD_OPT="$value" ;; 322 --with-ld-opt=*) NGX_LD_OPT="$value" ;;
354 369
355 --help print this message 370 --help print this message
356 371
357 --prefix=PATH set installation prefix 372 --prefix=PATH set installation prefix
358 --sbin-path=PATH set nginx binary pathname 373 --sbin-path=PATH set nginx binary pathname
374 --modules-path=PATH set modules path
359 --conf-path=PATH set nginx.conf pathname 375 --conf-path=PATH set nginx.conf pathname
360 --error-log-path=PATH set error log pathname 376 --error-log-path=PATH set error log pathname
361 --pid-path=PATH set nginx.pid pathname 377 --pid-path=PATH set nginx.pid pathname
362 --lock-path=PATH set nginx.lock pathname 378 --lock-path=PATH set nginx.lock pathname
363 379
382 --with-http_ssl_module enable ngx_http_ssl_module 398 --with-http_ssl_module enable ngx_http_ssl_module
383 --with-http_v2_module enable ngx_http_v2_module 399 --with-http_v2_module enable ngx_http_v2_module
384 --with-http_realip_module enable ngx_http_realip_module 400 --with-http_realip_module enable ngx_http_realip_module
385 --with-http_addition_module enable ngx_http_addition_module 401 --with-http_addition_module enable ngx_http_addition_module
386 --with-http_xslt_module enable ngx_http_xslt_module 402 --with-http_xslt_module enable ngx_http_xslt_module
403 --with-http_xslt_module=dynamic enable dynamic ngx_http_xslt_module
387 --with-http_image_filter_module enable ngx_http_image_filter_module 404 --with-http_image_filter_module enable ngx_http_image_filter_module
405 --with-http_image_filter_module=dynamic
406 enable dynamic ngx_http_image_filter_module
388 --with-http_geoip_module enable ngx_http_geoip_module 407 --with-http_geoip_module enable ngx_http_geoip_module
408 --with-http_geoip_module=dynamic enable dynamic ngx_http_geoip_module
389 --with-http_sub_module enable ngx_http_sub_module 409 --with-http_sub_module enable ngx_http_sub_module
390 --with-http_dav_module enable ngx_http_dav_module 410 --with-http_dav_module enable ngx_http_dav_module
391 --with-http_flv_module enable ngx_http_flv_module 411 --with-http_flv_module enable ngx_http_flv_module
392 --with-http_mp4_module enable ngx_http_mp4_module 412 --with-http_mp4_module enable ngx_http_mp4_module
393 --with-http_gunzip_module enable ngx_http_gunzip_module 413 --with-http_gunzip_module enable ngx_http_gunzip_module
449 469
450 --without-http disable HTTP server 470 --without-http disable HTTP server
451 --without-http-cache disable HTTP cache 471 --without-http-cache disable HTTP cache
452 472
453 --with-mail enable POP3/IMAP4/SMTP proxy module 473 --with-mail enable POP3/IMAP4/SMTP proxy module
474 --with-mail=dynamic enable dynamic POP3/IMAP4/SMTP proxy module
454 --with-mail_ssl_module enable ngx_mail_ssl_module 475 --with-mail_ssl_module enable ngx_mail_ssl_module
455 --without-mail_pop3_module disable ngx_mail_pop3_module 476 --without-mail_pop3_module disable ngx_mail_pop3_module
456 --without-mail_imap_module disable ngx_mail_imap_module 477 --without-mail_imap_module disable ngx_mail_imap_module
457 --without-mail_smtp_module disable ngx_mail_smtp_module 478 --without-mail_smtp_module disable ngx_mail_smtp_module
458 479
459 --with-stream enable TCP proxy module 480 --with-stream enable TCP proxy module
481 --with-stream=dynamic enable dynamic TCP proxy module
460 --with-stream_ssl_module enable ngx_stream_ssl_module 482 --with-stream_ssl_module enable ngx_stream_ssl_module
461 --without-stream_limit_conn_module disable ngx_stream_limit_conn_module 483 --without-stream_limit_conn_module disable ngx_stream_limit_conn_module
462 --without-stream_access_module disable ngx_stream_access_module 484 --without-stream_access_module disable ngx_stream_access_module
463 --without-stream_upstream_hash_module 485 --without-stream_upstream_hash_module
464 disable ngx_stream_upstream_hash_module 486 disable ngx_stream_upstream_hash_module
468 disable ngx_stream_upstream_zone_module 490 disable ngx_stream_upstream_zone_module
469 491
470 --with-google_perftools_module enable ngx_google_perftools_module 492 --with-google_perftools_module enable ngx_google_perftools_module
471 --with-cpp_test_module enable ngx_cpp_test_module 493 --with-cpp_test_module enable ngx_cpp_test_module
472 494
473 --add-module=PATH enable an external module 495 --add-module=PATH enable external module
496 --add-dynamic-module=PATH enable dynamic external module
474 497
475 --with-cc=PATH set C compiler pathname 498 --with-cc=PATH set C compiler pathname
476 --with-cpp=PATH set C preprocessor pathname 499 --with-cpp=PATH set C preprocessor pathname
477 --with-cc-opt=OPTIONS set additional C compiler options 500 --with-cc-opt=OPTIONS set additional C compiler options
478 --with-ld-opt=OPTIONS set additional linker options 501 --with-ld-opt=OPTIONS set additional linker options
531 NGX_WINE=$WINE 554 NGX_WINE=$WINE
532 fi 555 fi
533 556
534 557
535 NGX_SBIN_PATH=${NGX_SBIN_PATH:-sbin/nginx} 558 NGX_SBIN_PATH=${NGX_SBIN_PATH:-sbin/nginx}
559 NGX_MODULES_PATH=${NGX_MODULES_PATH:-modules}
536 NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf} 560 NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
537 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH` 561 NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
538 NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid} 562 NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
539 NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock} 563 NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
540 564