ngx_http_geoip2_module/config

44 lines
1.2 KiB
Text
Raw Permalink Normal View History

2014-01-31 00:00:34 +01:00
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"
2014-01-31 00:00:34 +01:00
. auto/feature
ngx_addon_name="ngx_geoip2_module"
2016-02-10 21:43:08 +01:00
if [ $ngx_found = yes ]; then
2016-02-10 21:43:08 +01:00
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
2016-02-10 21:43:08 +01:00
else
HTTP_MODULES="$HTTP_MODULES ngx_http_geoip2_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_geoip2_module.c"
2016-02-10 21:43:08 +01:00
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
fi
2014-01-31 00:00:34 +01:00
else
cat << END
$0: error: the geoip2 module requires the maxminddb library.
END
exit 1
fi