forked from leev/ngx_http_geoip2_module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
43 lines (40 loc) · 1.17 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
ngx_feature="MaxmindDB library"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs="#include <maxminddb.h>"
ngx_feature_libs=-lmaxminddb
ngx_feature_test="MMDB_s mmdb"
. auto/feature
ngx_addon_name="ngx_geoip2_module"
if [ $ngx_found = yes ]; then
if test -n "$ngx_module_link"; then
if [ $HTTP != NO ]; then
ngx_module_type=HTTP
ngx_module_name="ngx_http_geoip2_module"
ngx_module_incs=
ngx_module_deps=
ngx_module_srcs="$ngx_addon_dir/ngx_http_geoip2_module.c"
ngx_module_libs="$ngx_feature_libs"
. auto/module
fi
nginx_version=`awk '/^#define nginx_version / {print $3}' src/core/nginx.h`
if [ $STREAM != NO -a $nginx_version -gt 1011001 ]; then
ngx_module_type=STREAM
ngx_module_name="ngx_stream_geoip2_module"
ngx_module_incs=
ngx_module_deps=
ngx_module_srcs="$ngx_addon_dir/ngx_stream_geoip2_module.c"
ngx_module_libs="$ngx_feature_libs"
. auto/module
fi
else
HTTP_MODULES="$HTTP_MODULES ngx_http_geoip2_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_geoip2_module.c"
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
fi
else
cat << END
$0: error: the geoip2 module requires the maxminddb library.
END
exit 1
fi