conf 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 = yes ]; then
  46. CORE_INCS="$CORE_INCS $ngx_feature_path"
  47. if [ $USE_LIBGD = YES ]; then
  48. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  49. fi
  50. NGX_LIB_LIBGD=$ngx_feature_libs
  51. ngx_feature="GD WebP support"
  52. ngx_feature_name="NGX_HAVE_GD_WEBP"
  53. ngx_feature_test="gdImagePtr img = gdImageCreateFromWebpPtr(1, NULL);
  54. (void) img"
  55. . auto/feature
  56. else
  57. cat << END
  58. $0: error: the HTTP image filter module requires the GD library.
  59. You can either do not enable the module or install the libraries.
  60. END
  61. exit 1
  62. fi