upstream nginx-0.7.31
[nginx.git] / nginx / auto / lib / zlib / conf
1
2 # Copyright (C) Igor Sysoev
3
4
5 if [ $ZLIB != NONE ]; then
6     CORE_INCS="$CORE_INCS $ZLIB"
7
8     case "$NGX_CC_NAME" in
9
10         msvc* | owc* | bcc)
11             LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
12             CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
13         ;;
14
15         icc*)
16             LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
17
18             # to allow -ipo optimization we link with the *.o but not library
19             CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o"
20             CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o"
21             CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o"
22             CORE_LIBS="$CORE_LIBS $ZLIB/trees.o"
23             CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o"
24             CORE_LIBS="$CORE_LIBS $ZLIB/compress.o"
25
26             if [ $ZLIB_ASM != NO ]; then
27                 CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
28             fi
29         ;;
30
31         *)
32             LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
33             CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
34             #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
35         ;;
36
37     esac
38
39 else
40
41     if [ "$NGX_PLATFORM" != win32 ]; then
42         ZLIB=NO
43
44         # FreeBSD, Solaris, Linux
45
46         ngx_feature="zlib library"
47         ngx_feature_name=
48         ngx_feature_run=no
49         ngx_feature_incs="#include <zlib.h>"
50         ngx_feature_path=
51         ngx_feature_libs="-lz"
52         ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
53         . auto/feature
54
55
56         if [ $ngx_found = yes ]; then
57             CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
58             ZLIB=YES
59             ngx_found=no
60         fi
61     fi
62
63 fi