conf 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. if [ $ZLIB != NONE ]; then
  4. CORE_INCS="$CORE_INCS $ZLIB"
  5. case "$NGX_CC_NAME" in
  6. msvc | owc | bcc)
  7. have=NGX_ZLIB . auto/have
  8. LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
  9. CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
  10. ;;
  11. icc)
  12. have=NGX_ZLIB . auto/have
  13. LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
  14. # to allow -ipo optimization we link with the *.o but not library
  15. CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o"
  16. CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o"
  17. CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o"
  18. CORE_LIBS="$CORE_LIBS $ZLIB/trees.o"
  19. CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o"
  20. CORE_LIBS="$CORE_LIBS $ZLIB/compress.o"
  21. if [ $ZLIB_ASM != NO ]; then
  22. CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
  23. fi
  24. ;;
  25. *)
  26. have=NGX_ZLIB . auto/have
  27. LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
  28. CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
  29. #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
  30. ;;
  31. esac
  32. else
  33. if [ "$NGX_PLATFORM" != win32 ]; then
  34. ZLIB=NO
  35. # FreeBSD, Solaris, Linux
  36. ngx_feature="zlib library"
  37. ngx_feature_name="NGX_ZLIB"
  38. ngx_feature_run=no
  39. ngx_feature_incs="#include <zlib.h>"
  40. ngx_feature_path=
  41. ngx_feature_libs="-lz"
  42. ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
  43. . auto/feature
  44. if [ $ngx_found = yes ]; then
  45. CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
  46. ZLIB=YES
  47. ngx_found=no
  48. fi
  49. fi
  50. if [ $ZLIB != YES ]; then
  51. cat << END
  52. $0: error: the HTTP gzip module requires the zlib library.
  53. You can either disable the module by using --without-http_gzip_module
  54. option, or install the zlib library into the system, or build the zlib library
  55. statically from the source with nginx by using --with-zlib=<path> option.
  56. END
  57. exit 1
  58. fi
  59. fi