forked from nginx/nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic modules: auto/module script.
This script simplifies configuration of additional modules, including 3rd party ones. The script is extensible, and will be used to introduce dynamic linking of modules in upcoming changes. 3rd party module config scripts are called with ngx_module_link preset to "ADDON" - this allows config scripts to call auto/module without ngx_module_link explicitly defined, as well as testing if new interface is in place if compatibility with older nginx versions is desired. In collaboration with Ruslan Ermilov.
- Loading branch information
Showing
4 changed files
with
848 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
|
||
# Copyright (C) Ruslan Ermilov | ||
# Copyright (C) Nginx, Inc. | ||
|
||
|
||
case $ngx_module_type in | ||
HTTP_*) ngx_var=HTTP ;; | ||
*) ngx_var=$ngx_module_type ;; | ||
esac | ||
|
||
|
||
if [ "$ngx_module_link" = YES ]; then | ||
|
||
eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \ | ||
$ngx_module_name\" | ||
|
||
eval ${ngx_var}_SRCS=\"\$${ngx_var}_SRCS $ngx_module_srcs\" | ||
|
||
if test -n "$ngx_module_incs"; then | ||
eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\" | ||
fi | ||
|
||
if test -n "$ngx_module_deps"; then | ||
eval ${ngx_var}_DEPS=\"\$${ngx_var}_DEPS $ngx_module_deps\" | ||
fi | ||
|
||
for lib in $ngx_module_libs | ||
do | ||
case $lib in | ||
|
||
PCRE | OPENSSL | MD5 | SHA1 | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP) | ||
eval USE_${lib}=YES | ||
;; | ||
|
||
*) | ||
CORE_LIBS="$CORE_LIBS $lib" | ||
;; | ||
|
||
esac | ||
done | ||
|
||
elif [ "$ngx_module_link" = ADDON ]; then | ||
|
||
eval ${ngx_module_type}_MODULES=\"\$${ngx_module_type}_MODULES \ | ||
$ngx_module_name\" | ||
|
||
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_module_srcs" | ||
|
||
if test -n "$ngx_module_incs"; then | ||
eval ${ngx_var}_INCS=\"\$${ngx_var}_INCS $ngx_module_incs\" | ||
fi | ||
|
||
if test -n "$ngx_module_deps"; then | ||
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_module_deps" | ||
fi | ||
|
||
for lib in $ngx_module_libs | ||
do | ||
case $lib in | ||
|
||
PCRE | OPENSSL | MD5 | SHA1 | ZLIB | LIBXSLT | LIBGD | PERL | GEOIP) | ||
eval USE_${lib}=YES | ||
;; | ||
|
||
*) | ||
CORE_LIBS="$CORE_LIBS $lib" | ||
;; | ||
|
||
esac | ||
done | ||
fi |
Oops, something went wrong.