File: config

package info (click to toggle)
nginx 1.18.0-6.1%2Bdeb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 19,344 kB
  • sloc: ansic: 250,653; perl: 7,548; sh: 1,408; ruby: 879; python: 358; makefile: 338; awk: 36; cpp: 18
file content (43 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download | duplicates (3)
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