conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright (C) Igor Sysoev
  2. ngx_feature="GeoIP library"
  3. ngx_feature_name=
  4. ngx_feature_run=no
  5. ngx_feature_incs=
  6. ngx_feature_path=
  7. ngx_feature_libs="-lGeoIP"
  8. ngx_feature_test="GeoIP_open(NULL, 0)"
  9. . auto/feature
  10. if [ $ngx_found = no ]; then
  11. # FreeBSD port
  12. ngx_feature="GeoIP library in /usr/local/"
  13. if [ $NGX_RPATH = YES ]; then
  14. ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
  15. else
  16. ngx_feature_libs="-L/usr/local/lib -lGeoIP"
  17. fi
  18. . auto/feature
  19. fi
  20. if [ $ngx_found = no ]; then
  21. # NetBSD port
  22. ngx_feature="GeoIP library in /usr/pkg/"
  23. ngx_feature_path="/usr/pkg/include/"
  24. if [ $NGX_RPATH = YES ]; then
  25. ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
  26. else
  27. ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
  28. fi
  29. . auto/feature
  30. fi
  31. if [ $ngx_found = no ]; then
  32. # MacPorts
  33. ngx_feature="GeoIP library in /opt/local/"
  34. ngx_feature_path="/opt/local/include"
  35. if [ $NGX_RPATH = YES ]; then
  36. ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
  37. else
  38. ngx_feature_libs="-L/opt/local/lib -lGeoIP"
  39. fi
  40. . auto/feature
  41. fi
  42. if [ $ngx_found = yes ]; then
  43. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  44. else
  45. cat << END
  46. $0: error: the GeoIP module requires the GeoIP library.
  47. You can either do not enable the module or install the library.
  48. END
  49. exit 1
  50. fi