conf 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. ngx_feature="GeoIP library"
  4. ngx_feature_name=
  5. ngx_feature_run=no
  6. ngx_feature_incs="#include <GeoIP.h>"
  7. ngx_feature_path=
  8. ngx_feature_libs="-lGeoIP"
  9. ngx_feature_test="GeoIP_open(NULL, 0)"
  10. . auto/feature
  11. if [ $ngx_found = no ]; then
  12. # FreeBSD port
  13. ngx_feature="GeoIP library in /usr/local/"
  14. ngx_feature_path="/usr/local/include"
  15. if [ $NGX_RPATH = YES ]; then
  16. ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
  17. else
  18. ngx_feature_libs="-L/usr/local/lib -lGeoIP"
  19. fi
  20. . auto/feature
  21. fi
  22. if [ $ngx_found = no ]; then
  23. # NetBSD port
  24. ngx_feature="GeoIP library in /usr/pkg/"
  25. ngx_feature_path="/usr/pkg/include"
  26. if [ $NGX_RPATH = YES ]; then
  27. ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
  28. else
  29. ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
  30. fi
  31. . auto/feature
  32. fi
  33. if [ $ngx_found = no ]; then
  34. # MacPorts
  35. ngx_feature="GeoIP library in /opt/local/"
  36. ngx_feature_path="/opt/local/include"
  37. if [ $NGX_RPATH = YES ]; then
  38. ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
  39. else
  40. ngx_feature_libs="-L/opt/local/lib -lGeoIP"
  41. fi
  42. . auto/feature
  43. fi
  44. if [ $ngx_found = yes ]; then
  45. CORE_INCS="$CORE_INCS $ngx_feature_path"
  46. if [ $USE_GEOIP = YES ]; then
  47. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  48. fi
  49. NGX_LIB_GEOIP=$ngx_feature_libs
  50. ngx_feature="GeoIP IPv6 support"
  51. ngx_feature_name="NGX_HAVE_GEOIP_V6"
  52. ngx_feature_run=no
  53. ngx_feature_incs="#include <stdio.h>
  54. #include <GeoIP.h>"
  55. #ngx_feature_path=
  56. #ngx_feature_libs=
  57. ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
  58. . auto/feature
  59. else
  60. cat << END
  61. $0: error: the GeoIP module requires the GeoIP library.
  62. You can either do not enable the module or install the library.
  63. END
  64. exit 1
  65. fi