blob: 5647e9167e6a405089a842376d5c95a8745949b2 [file] [log] [blame]
Igor Sysoevbc101472009-07-20 07:10:43 +00001
2# Copyright (C) Igor Sysoev
3
4
5 ngx_feature="GeoIP library"
6 ngx_feature_name=
7 ngx_feature_run=no
8 ngx_feature_incs=
9 ngx_feature_path=
10 ngx_feature_libs="-lGeoIP"
11 ngx_feature_test="GeoIP_open(NULL, 0)"
12 . auto/feature
13
14
15if [ $ngx_found = no ]; then
16
17 # FreeBSD port
18
19 ngx_feature="GeoIP library in /usr/local/"
20
21 if [ $NGX_RPATH = YES ]; then
22 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
23 else
24 ngx_feature_libs="-L/usr/local/lib -lGeoIP"
25 fi
26
27 . auto/feature
28fi
29
30
31if [ $ngx_found = no ]; then
32
33 # NetBSD port
34
35 ngx_feature="GeoIP library in /usr/pkg/"
36 ngx_feature_path="/usr/pkg/include/"
37
38 if [ $NGX_RPATH = YES ]; then
39 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
40 else
41 ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
42 fi
43
44 . auto/feature
45fi
46
47
48if [ $ngx_found = no ]; then
49
50 # MacPorts
51
52 ngx_feature="GeoIP library in /opt/local/"
53 ngx_feature_path="/opt/local/include"
54
55 if [ $NGX_RPATH = YES ]; then
56 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
57 else
58 ngx_feature_libs="-L/opt/local/lib -lGeoIP"
59 fi
60
61 . auto/feature
62fi
63
64
65if [ $ngx_found = yes ]; then
66 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
67
68else
69
70cat << END
71
72$0: error: the GeoIP module requires the GeoIP library.
73You can either do not enable the module or install the library.
74
75END
76
77 exit 1
78fi