2003-12-14 20:10:27 +00:00
|
|
|
|
2004-09-29 16:00:49 +00:00
|
|
|
# Copyright (C) Igor Sysoev
|
2012-01-18 15:07:43 +00:00
|
|
|
# Copyright (C) Nginx, Inc.
|
2004-09-29 16:00:49 +00:00
|
|
|
|
|
|
|
|
2004-02-09 07:46:43 +00:00
|
|
|
if [ $ZLIB != NONE ]; then
|
2004-03-29 17:43:58 +00:00
|
|
|
CORE_INCS="$CORE_INCS $ZLIB"
|
2003-12-14 20:10:27 +00:00
|
|
|
|
2004-10-21 15:34:38 +00:00
|
|
|
case "$NGX_CC_NAME" in
|
2004-03-09 19:47:07 +00:00
|
|
|
|
2016-02-13 06:47:34 +03:00
|
|
|
msvc | owc | bcc)
|
2012-12-23 16:04:14 +00:00
|
|
|
have=NGX_ZLIB . auto/have
|
2004-03-09 19:47:07 +00:00
|
|
|
LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
|
|
|
|
;;
|
|
|
|
|
2016-02-13 06:47:34 +03:00
|
|
|
icc)
|
2012-12-23 16:04:14 +00:00
|
|
|
have=NGX_ZLIB . auto/have
|
2004-03-14 20:46:25 +00:00
|
|
|
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
|
|
|
|
|
|
|
# to allow -ipo optimization we link with the *.o but not library
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o"
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o"
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o"
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/trees.o"
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o"
|
2005-02-22 14:40:13 +00:00
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/compress.o"
|
2004-03-14 20:46:25 +00:00
|
|
|
|
|
|
|
if [ $ZLIB_ASM != NO ]; then
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2004-03-09 19:47:07 +00:00
|
|
|
*)
|
2012-12-23 16:04:14 +00:00
|
|
|
have=NGX_ZLIB . auto/have
|
2004-03-09 19:47:07 +00:00
|
|
|
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
2004-04-04 20:32:09 +00:00
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
|
|
|
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
2004-03-09 19:47:07 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
2003-12-14 20:10:27 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2005-02-22 14:40:13 +00:00
|
|
|
if [ "$NGX_PLATFORM" != win32 ]; then
|
2004-10-21 15:34:38 +00:00
|
|
|
ZLIB=NO
|
2003-12-14 20:10:27 +00:00
|
|
|
|
2004-04-18 19:06:02 +00:00
|
|
|
# FreeBSD, Solaris, Linux
|
|
|
|
|
2004-10-21 15:34:38 +00:00
|
|
|
ngx_feature="zlib library"
|
2012-12-23 16:04:14 +00:00
|
|
|
ngx_feature_name="NGX_ZLIB"
|
2004-10-21 15:34:38 +00:00
|
|
|
ngx_feature_run=no
|
|
|
|
ngx_feature_incs="#include <zlib.h>"
|
2006-11-27 11:07:09 +00:00
|
|
|
ngx_feature_path=
|
2004-10-21 15:34:38 +00:00
|
|
|
ngx_feature_libs="-lz"
|
|
|
|
ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
|
|
|
|
. auto/feature
|
2003-12-14 20:10:27 +00:00
|
|
|
|
|
|
|
|
2004-04-08 15:58:25 +00:00
|
|
|
if [ $ngx_found = yes ]; then
|
2004-10-21 15:34:38 +00:00
|
|
|
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
2004-04-08 15:58:25 +00:00
|
|
|
ZLIB=YES
|
2004-10-21 15:34:38 +00:00
|
|
|
ngx_found=no
|
2010-07-08 15:57:36 +00:00
|
|
|
fi
|
|
|
|
fi
|
2009-05-26 14:28:49 +00:00
|
|
|
|
2010-07-08 15:57:36 +00:00
|
|
|
if [ $ZLIB != YES ]; then
|
2009-05-26 14:28:49 +00:00
|
|
|
cat << END
|
|
|
|
|
|
|
|
$0: error: the HTTP gzip module requires the zlib library.
|
|
|
|
You can either disable the module by using --without-http_gzip_module
|
|
|
|
option, or install the zlib library into the system, or build the zlib library
|
|
|
|
statically from the source with nginx by using --with-zlib=<path> option.
|
|
|
|
|
|
|
|
END
|
2010-07-08 15:57:36 +00:00
|
|
|
exit 1
|
2003-12-14 20:10:27 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|