conf 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. ngx_feature="GD library"
  4. ngx_feature_name=
  5. ngx_feature_run=no
  6. ngx_feature_incs="#include <gd.h>"
  7. ngx_feature_path=
  8. ngx_feature_libs="-lgd"
  9. ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);"
  10. . auto/feature
  11. if [ $ngx_found = no ]; then
  12. # FreeBSD port
  13. ngx_feature="GD 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 -lgd"
  17. else
  18. ngx_feature_libs="-L/usr/local/lib -lgd"
  19. fi
  20. . auto/feature
  21. fi
  22. if [ $ngx_found = no ]; then
  23. # NetBSD port
  24. ngx_feature="GD 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 -lgd"
  28. else
  29. ngx_feature_libs="-L/usr/pkg/lib -lgd"
  30. fi
  31. . auto/feature
  32. fi
  33. if [ $ngx_found = no ]; then
  34. # MacPorts
  35. ngx_feature="GD 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 -lgd"
  39. else
  40. ngx_feature_libs="-L/opt/local/lib -lgd"
  41. fi
  42. . auto/feature
  43. fi
  44. if [ $ngx_found = yes ]; then
  45. CORE_INCS="$CORE_INCS $ngx_feature_path"
  46. if [ $USE_LIBGD = YES ]; then
  47. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  48. fi
  49. NGX_LIB_LIBGD=$ngx_feature_libs
  50. ngx_feature="GD WebP support"
  51. ngx_feature_name="NGX_HAVE_GD_WEBP"
  52. ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);"
  53. . auto/feature
  54. else
  55. cat << END
  56. $0: error: the HTTP image filter module requires the GD library.
  57. You can either do not enable the module or install the libraries.
  58. END
  59. exit 1
  60. fi