Update and clean Tomato RAF files
[tomato.git] / release / src / router / nginx / auto / lib / geoip / conf
blob53c274d54dccbfdf0800c1e1ef289d66c6551ebe
2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
6     ngx_feature="GeoIP library"
7     ngx_feature_name=
8     ngx_feature_run=no
9     ngx_feature_incs="#include <GeoIP.h>"
10     ngx_feature_path=
11     ngx_feature_libs="-lGeoIP"
12     ngx_feature_test="GeoIP_open(NULL, 0)"
13     . auto/feature
16 if [ $ngx_found = no ]; then
18     # FreeBSD port
20     ngx_feature="GeoIP library in /usr/local/"
21     ngx_feature_path="/usr/local/include"
23     if [ $NGX_RPATH = YES ]; then
24         ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
25     else
26         ngx_feature_libs="-L/usr/local/lib -lGeoIP"
27     fi
29     . auto/feature
33 if [ $ngx_found = no ]; then
35     # NetBSD port
37     ngx_feature="GeoIP library in /usr/pkg/"
38     ngx_feature_path="/usr/pkg/include"
40     if [ $NGX_RPATH = YES ]; then
41         ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
42     else
43         ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
44     fi
46     . auto/feature
50 if [ $ngx_found = no ]; then
52     # MacPorts
54     ngx_feature="GeoIP library in /opt/local/"
55     ngx_feature_path="/opt/local/include"
57     if [ $NGX_RPATH = YES ]; then
58         ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
59     else
60         ngx_feature_libs="-L/opt/local/lib -lGeoIP"
61     fi
63     . auto/feature
67 if [ $ngx_found = yes ]; then
69     CORE_INCS="$CORE_INCS $ngx_feature_path"
70     CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
72     if [ $NGX_IPV6 = YES ]; then
73         ngx_feature="GeoIP IPv6 support"
74         ngx_feature_name="NGX_HAVE_GEOIP_V6"
75         ngx_feature_run=no
76         ngx_feature_incs="#include <stdio.h>
77                           #include <GeoIP.h>"
78         #ngx_feature_path=
79         #ngx_feature_libs=
80         ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
81         . auto/feature
82     fi
84 else
86 cat << END
88 $0: error: the GeoIP module requires the GeoIP library.
89 You can either do not enable the module or install the library.
91 END
93     exit 1