File dynamic-module.patch of Package nginx-module-http-substitutions-filter
From 9c540104fd56f5f9f03cd553abde68674b2d410c Mon Sep 17 00:00:00 2001
From: Michal Rostecki <mrostecki@suse.com>
Date: Mon, 16 Apr 2018 13:28:48 +0200
Subject: [PATCH] config: Allow to build as a dynamic module
nginx 1.9.11 introduced the functionality of loading modules
dynamically. Hovewer, the syntax of the config file for dynamic
modules is slightly different, so the substitutions filter modue
needed to be be adjusted to it.
---
config | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/config b/config
index fdb016c..05f2f59 100644
--- a/config
+++ b/config
@@ -1,3 +1,12 @@
ngx_addon_name=ngx_http_subs_filter_module
-HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_subs_filter_module"
-NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_subs_filter_module.c"
+
+if test -n "$ngx_module_link"; then
+ ngx_module_type=HTTP_AUX_FILTER
+ ngx_module_name=ngx_http_subs_filter_module
+ ngx_module_srcs="$ngx_addon_dir/ngx_http_subs_filter_module.c"
+
+ . auto/module
+else
+ HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_subs_filter_module"
+ NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_subs_filter_module.c"
+fi