summaryrefslogtreecommitdiffhomepage
path: root/auto/lib/zlib/conf
blob: c699ca63fe8de9b05a61be3ed6d46f5cea26629a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

if [ $ZLIB != NONE ]; then
    CORE_INCS="$CORE_INCS -I $ZLIB"

    case "$CC" in

        cl)
            LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
            CORE_LIBS="$CORE_LIBS zlib.lib"
            CORE_LINK="$CORE_LINK -libpath:$ZLIB"
        ;;

        wcl386)
            LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
            CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
        ;;

        *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
        ;;

        *)
            LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
            CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
        ;;

    esac

else

    ngx_lib_inc="#include <zlib.h>"

    ngx_lib="zlib"
    ngx_lib_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
    ngx_libs=-lz
    . auto/lib/test


    if [ $ngx_found = yes ]; then
        CORE_LIBS="$CORE_LIBS $ngx_libs"
        ZLIB=YES
    else
        ZLIB=NO
    fi

fi