From a45c0c645841795d124acd43ea8a5c8297754a6f Mon Sep 17 00:00:00 2001 From: Su Yang Date: Mon, 14 Jun 2021 11:47:03 +0800 Subject: [PATCH 1/2] support dynamic build --- config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config b/config index 42ebe33..4ca7d3d 100644 --- a/config +++ b/config @@ -1,5 +1,20 @@ ngx_addon_name=ngx_http_xss_filter_module + HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_xss_filter_module" NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_xss_filter_module.c $ngx_addon_dir/src/ngx_http_xss_util.c" NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/ngx_http_xss_filter_module.h $ngx_addon_dir/src/ngx_http_xss_util.h" +if test -n "$ngx_module_link"; then + ngx_module_type=HTTP_AUX_FILTER + ngx_module_name=$ngx_addon_name + ngx_module_incs= + ngx_module_deps="$NGX_ADDON_DEPS" + ngx_module_srcs="$NGX_ADDON_SRCS" + ngx_module_libs= + + . auto/module +else + HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name" + NGX_ADDON_SRCS="$NGX_ADDON_SRCS" + NGX_ADDON_DEPS="$NGX_ADDON_DEPS" +fi