-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig
58 lines (45 loc) · 1.47 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
ngx_addon_name=ngx_stream_ipdb_module
_STREAM_IPDB_SRCS="\
$ngx_addon_dir/ngx_stream_ipdb_module.c \
$ngx_addon_dir/ipdb/ipdb.c \
"
_STREAM_IPDB_DRPS="\
$ngx_addon_dir/ngx_stream_ipdb_module.h \
"
ipdb_lua() {
echo " + ipdb module support lua"
have=NGX_STREAM_IPDB_LUA . auto/have
_STREAM_IPDB_SRCS="$_STREAM_IPDB_SRCS $ngx_addon_dir/ngx_stream_ipdb_lua.c"
_STREAM_IPDB_DRPS="$_STREAM_IPDB_DRPS $ngx_addon_dir/ngx_stream_ipdb_lua.h"
}
echo $NGX_ADDON_DEPS | grep "ngx_stream_lua_api" > /dev/null
if [ $? -eq 0 ]; then
ipdb_lua
fi
_STREAM_JSON_LIB="-lm -ljson-c"
ngx_feature="json-c library"
ngx_feature_name="NGX_JSON_C"
ngx_feature_run=no
ngx_feature_incs="#include <json-c/json.h>"
ngx_feature_path=
ngx_feature_libs="$_STREAM_JSON_LIB"
ngx_feature_test="json_c_version_num()"
. auto/feature
if [ $ngx_found = yes ]; then
if test -n "$ngx_module_link"; then
ngx_module_type=STREAM
ngx_module_name=$ngx_addon_name
ngx_module_srcs="$_STREAM_IPDB_SRCS"
ngx_module_libs="$_STREAM_JSON_LIB"
ngx_module_deps="$_STREAM_IPDB_DRPS"
. auto/module
else
STREAM_MODULES="$STREAM_MODULES $ngx_addon_name"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $_STREAM_IPDB_SRCS"
CORE_LIBS="$CORE_LIBS $_STREAM_JSON_LIB"
HTTP_INCS="$HTTP_INCS $ngx_addon_dir"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $_STREAM_IPDB_DRPS"
fi
else
echo "warning: $ngx_addon_name invalid. please yum install json-c"
fi