From 72efa2b8ce7c5ac01b4944ede4e52addb3ead94d Mon Sep 17 00:00:00 2001 From: Hiroaki Nakamura Date: Fri, 12 Feb 2016 09:07:50 +0900 Subject: [PATCH 1/2] Convert a config file to build a dynamic module --- config | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/config b/config index aae0a22..2b8a691 100644 --- a/config +++ b/config @@ -1,3 +1,12 @@ ngx_addon_name=ngx_http_upstream_consistent_hash -HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_consistent_hash_module" -NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upstream_consistent_hash_module.c" +HTTP_UPSTREAM_CONSISTENT_HASH_SRCS="$ngx_addon_dir/ngx_http_upstream_consistent_hash_module.c" +if [ -n "$ngx_module_link" ]; then + ngx_module_type=HTTP + ngx_module_name="$ngx_addon_name" + ngx_module_srcs="$HTTP_UPSTREAM_CONSISTENT_HASH_SRCS" + + . auto/module +else + HTTP_MODULES="$HTTP_MODULES $ngx_addon_name" + NGX_ADDON_SRCS="$NGX_ADDON_SRCS $HTTP_UPSTREAM_CONSISTENT_HASH_SRCS" +fi From 4f3e570454eaf9fa53f6d21b3945ca4eb55041b4 Mon Sep 17 00:00:00 2001 From: Hiroaki Nakamura Date: Mon, 15 Feb 2016 12:41:36 +0900 Subject: [PATCH 2/2] Add _module suffix to ngx_addon_name --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 2b8a691..d2e722c 100644 --- a/config +++ b/config @@ -1,4 +1,4 @@ -ngx_addon_name=ngx_http_upstream_consistent_hash +ngx_addon_name=ngx_http_upstream_consistent_hash_module HTTP_UPSTREAM_CONSISTENT_HASH_SRCS="$ngx_addon_dir/ngx_http_upstream_consistent_hash_module.c" if [ -n "$ngx_module_link" ]; then ngx_module_type=HTTP