conf 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. (void) img"
  11. . auto/feature
  12. if [ $ngx_found = no ]; then
  13. # FreeBSD port
  14. ngx_feature="GD library in /usr/local/"
  15. ngx_feature_path="/usr/local/include"
  16. if [ $NGX_RPATH = YES ]; then
  17. ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lgd"
  18. else
  19. ngx_feature_libs="-L/usr/local/lib -lgd"
  20. fi
  21. . auto/feature
  22. fi
  23. if [ $ngx_found = no ]; then
  24. # NetBSD port
  25. ngx_feature="GD library in /usr/pkg/"
  26. ngx_feature_path="/usr/pkg/include"
  27. if [ $NGX_RPATH = YES ]; then
  28. ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd"
  29. else
  30. ngx_feature_libs="-L/usr/pkg/lib -lgd"
  31. fi
  32. . auto/feature
  33. fi
  34. if [ $ngx_found = no ]; then
  35. # MacPorts
  36. ngx_feature="GD library in /opt/local/"
  37. ngx_feature_path="/opt/local/include"
  38. if [ $NGX_RPATH = YES ]; then
  39. ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lgd"
  40. else
  41. ngx_feature_libs="-L/opt/local/lib -lgd"
  42. fi
  43. . auto/feature
  44. fi
  45. if [ $ngx_found = no ]; then
  46. # Homebrew on Apple Silicon
  47. ngx_feature="GD library in /opt/homebrew/"
  48. ngx_feature_path="/opt/homebrew/include"
  49. if [ $NGX_RPATH = YES ]; then
  50. ngx_feature_libs="-R/opt/homebrew/lib -L/opt/homebrew/lib -lgd"
  51. else
  52. ngx_feature_libs="-L/opt/homebrew/lib -lgd"
  53. fi
  54. . auto/feature
  55. fi
  56. if [ $ngx_found = yes ]; then
  57. CORE_INCS="$CORE_INCS $ngx_feature_path"
  58. if [ $USE_LIBGD = YES ]; then
  59. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  60. fi
  61. NGX_LIB_LIBGD=$ngx_feature_libs
  62. ngx_feature="GD WebP support"
  63. ngx_feature_name="NGX_HAVE_GD_WEBP"
  64. ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);
  65. (void) img"
  66. . auto/feature
  67. else
  68. cat << END
  69. $0: error: the HTTP image filter module requires the GD library.
  70. You can either do not enable the module or install the libraries.
  71. END
  72. exit 1
  73. fi