Skip to content

Commit e078369

Browse files
committed
Merge pull request #120 from LinuxJedi/dynamic-module
Dynamic module @LinuxJedi
2 parents 551b9d5 + dbc63fd commit e078369

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

src/c/config

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
ngx_addon_name=ngx_http_clojure_module
2-
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_clojure_module"
3-
#HTTP_MODULES="$HTTP_MODULES ngx_http_clojure_module"
4-
NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
5-
$ngx_addon_dir/ngx_http_clojure_mem.c \
2+
3+
CLOJURE_SRCS="$ngx_addon_dir/ngx_http_clojure_mem.c \
64
$ngx_addon_dir/ngx_http_clojure_jvm.c \
75
$ngx_addon_dir/ngx_http_clojure_module.c \
86
$ngx_addon_dir/ngx_http_clojure_socket.c \
97
$ngx_addon_dir/ngx_http_clojure_shared_map.c \
108
$ngx_addon_dir/ngx_http_clojure_shared_map_hashmap.c \
119
$ngx_addon_dir/ngx_http_clojure_shared_map_tinymap.c \
1210
"
13-
NGX_ADDON_DEPS="$NGX_ADDON_DEPS \
14-
$ngx_addon_dir/ngx_http_clojure_jvm.h \
15-
$ngx_addon_dir/ngx_http_clojure_mem.h \
16-
$ngx_addon_dir/ngx_http_clojure_socket.h \
17-
$ngx_addon_dir/ngx_http_clojure_shared_map.h \
18-
$ngx_addon_dir/ngx_http_clojure_shared_map_hashmap.h \
19-
$ngx_addon_dir/ngx_http_clojure_shared_map_tinymap.h \
11+
CLOJURE_DEPS="$NGX_ADDON_DEPS \
12+
$ngx_addon_dir/ngx_http_clojure_jvm.h \
13+
$ngx_addon_dir/ngx_http_clojure_mem.h \
14+
$ngx_addon_dir/ngx_http_clojure_socket.h \
15+
$ngx_addon_dir/ngx_http_clojure_shared_map.h \
16+
$ngx_addon_dir/ngx_http_clojure_shared_map_hashmap.h \
17+
$ngx_addon_dir/ngx_http_clojure_shared_map_tinymap.h \
2018
"
19+
20+
if test -n "$ngx_module_link"; then
21+
ngx_module_type=HTTP_AUX_FILTER
22+
ngx_module_name=ngx_http_clojure_module
23+
ngx_module_srcs=$CLOJURE_SRCS
24+
ngx_module_deps=$CLOJURE_DEPS
25+
26+
. auto/module
27+
else
28+
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_clojure_module"
29+
#HTTP_MODULES="$HTTP_MODULES ngx_http_clojure_module"
30+
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $CLOJURE_SRCS"
31+
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $CLOJURE_DEPS"
32+
fi
2133
HTTP_INCS="$HTTP_INCS $ngx_addon_dir"
2234

2335
USE_SHA1=YES

0 commit comments

Comments
 (0)