Igor Sysoev | bc10147 | 2009-07-20 07:10:43 +0000 | [diff] [blame] | 1 | |
| 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 | |
| 15 | if [ $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 |
| 28 | fi |
| 29 | |
| 30 | |
| 31 | if [ $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 |
| 45 | fi |
| 46 | |
| 47 | |
| 48 | if [ $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 |
| 62 | fi |
| 63 | |
| 64 | |
| 65 | if [ $ngx_found = yes ]; then |
| 66 | CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
| 67 | |
| 68 | else |
| 69 | |
| 70 | cat << END |
| 71 | |
| 72 | $0: error: the GeoIP module requires the GeoIP library. |
| 73 | You can either do not enable the module or install the library. |
| 74 | |
| 75 | END |
| 76 | |
| 77 | exit 1 |
| 78 | fi |