2003-12-15 04:10:27 +08:00
|
|
|
|
2004-09-30 00:00:49 +08:00
|
|
|
# Copyright (C) Igor Sysoev
|
|
|
|
|
|
|
|
|
2004-02-09 15:46:43 +08:00
|
|
|
if [ $ZLIB != NONE ]; then
|
2004-03-30 01:43:58 +08:00
|
|
|
CORE_INCS="$CORE_INCS $ZLIB"
|
2003-12-15 04:10:27 +08:00
|
|
|
|
2004-03-26 04:03:02 +08:00
|
|
|
case "$CC" in
|
2004-03-10 03:47:07 +08:00
|
|
|
|
2004-03-30 01:43:58 +08:00
|
|
|
cl | wcl386 | bcc32)
|
2004-03-10 03:47:07 +08:00
|
|
|
LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
|
|
|
|
;;
|
|
|
|
|
2004-03-15 04:46:25 +08:00
|
|
|
*icc)
|
|
|
|
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"
|
|
|
|
|
|
|
|
if [ $ZLIB_ASM != NO ]; then
|
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
2004-03-10 03:47:07 +08:00
|
|
|
*)
|
|
|
|
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
2004-04-05 04:32:09 +08:00
|
|
|
CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
|
|
|
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
2004-03-10 03:47:07 +08:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
2003-12-15 04:10:27 +08:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2004-04-08 23:58:25 +08:00
|
|
|
if [ $PLATFORM != win32 ]; then
|
2003-12-15 04:10:27 +08:00
|
|
|
|
2004-04-19 03:06:02 +08:00
|
|
|
# FreeBSD, Solaris, Linux
|
|
|
|
|
|
|
|
ngx_lib_cflags=
|
|
|
|
ngx_lib_inc="#include <zlib.h>"
|
2004-04-08 23:58:25 +08:00
|
|
|
ngx_lib="zlib library"
|
|
|
|
ngx_lib_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
|
|
|
|
ngx_libs=-lz
|
|
|
|
. auto/lib/test
|
2003-12-15 04:10:27 +08:00
|
|
|
|
|
|
|
|
2004-04-08 23:58:25 +08:00
|
|
|
if [ $ngx_found = yes ]; then
|
|
|
|
CORE_LIBS="$CORE_LIBS $ngx_libs"
|
|
|
|
ZLIB=YES
|
|
|
|
else
|
|
|
|
ZLIB=NO
|
|
|
|
fi
|
2003-12-15 04:10:27 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|