Skip to content

Commit 738f0c3

Browse files
committed
make dynamically loadable module
ref: yaoweibin#234 (comment)
1 parent 87bfa66 commit 738f0c3

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

config

+11-7
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ ngx_check_src="$ngx_addon_dir/ngx_http_upstream_check_module.c"
99
ngx_feature_test="int a;"
1010
. auto/feature
1111

12-
if [ $ngx_found = yes ]; then
12+
ngx_addon_name=ngx_http_upstream_check_module
13+
ngx_module_incs=$ngx_addon_dir
14+
15+
if test -n "$ngx_module_link"; then
16+
ngx_module_type="HTTP"
17+
ngx_module_name="ngx_http_upstream_check_module"
18+
ngx_module_srcs="$ngx_addon_dir/ngx_http_upstream_check_module.c"
19+
ngx_module_deps="$ngx_addon_dir/ngx_http_upstream_check_module.h"
20+
21+
. auto/module
22+
else
1323
have=NGX_HTTP_UPSTREAM_CHECK . auto/have
1424
CORE_INCS="$CORE_INCS $ngx_feature_path"
15-
ngx_addon_name=ngx_http_upstream_check_module
1625
HTTP_MODULES="$HTTP_MODULES ngx_http_upstream_check_module"
1726
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_feature_deps"
1827
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_check_src"
19-
else
20-
cat << END
21-
$0: error: the ngx_http_upstream_check_module addon error.
22-
END
23-
exit 1
2428
fi

0 commit comments

Comments
 (0)