Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 1 | |
Igor Sysoev | ff8da91 | 2004-09-29 16:00:49 +0000 | [diff] [blame] | 2 | # Copyright (C) Igor Sysoev |
| 3 | |
| 4 | |
Igor Sysoev | 7af6b16 | 2004-02-09 07:46:43 +0000 | [diff] [blame] | 5 | if [ $ZLIB != NONE ]; then |
Igor Sysoev | 11dbe97 | 2004-03-29 17:43:58 +0000 | [diff] [blame] | 6 | CORE_INCS="$CORE_INCS $ZLIB" |
Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 7 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 8 | case "$NGX_CC_NAME" in |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 9 | |
Igor Sysoev | 1b73583 | 2004-11-11 14:07:14 +0000 | [diff] [blame] | 10 | msvc* | owc* | bcc) |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 11 | LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib" |
| 12 | CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib" |
| 13 | ;; |
| 14 | |
Igor Sysoev | 1b73583 | 2004-11-11 14:07:14 +0000 | [diff] [blame] | 15 | icc*) |
Igor Sysoev | 3646a16 | 2004-03-14 20:46:25 +0000 | [diff] [blame] | 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" |
Igor Sysoev | d039a2e | 2005-02-22 14:40:13 +0000 | [diff] [blame] | 24 | CORE_LIBS="$CORE_LIBS $ZLIB/compress.o" |
Igor Sysoev | 3646a16 | 2004-03-14 20:46:25 +0000 | [diff] [blame] | 25 | |
| 26 | if [ $ZLIB_ASM != NO ]; then |
| 27 | CORE_LIBS="$CORE_LIBS $ZLIB/match.o" |
| 28 | fi |
| 29 | ;; |
| 30 | |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 31 | *) |
| 32 | LINK_DEPS="$LINK_DEPS $ZLIB/libz.a" |
Igor Sysoev | 9a864bd | 2004-04-04 20:32:09 +0000 | [diff] [blame] | 33 | CORE_LIBS="$CORE_LIBS $ZLIB/libz.a" |
| 34 | #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz" |
Igor Sysoev | fc5a10a | 2004-03-09 19:47:07 +0000 | [diff] [blame] | 35 | ;; |
| 36 | |
| 37 | esac |
Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 38 | |
| 39 | else |
| 40 | |
Igor Sysoev | d039a2e | 2005-02-22 14:40:13 +0000 | [diff] [blame] | 41 | if [ "$NGX_PLATFORM" != win32 ]; then |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 42 | ZLIB=NO |
Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 43 | |
Igor Sysoev | 9bfb434 | 2004-04-18 19:06:02 +0000 | [diff] [blame] | 44 | # FreeBSD, Solaris, Linux |
| 45 | |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 46 | ngx_feature="zlib library" |
Igor Sysoev | f690604 | 2004-11-25 16:17:31 +0000 | [diff] [blame] | 47 | ngx_feature_name= |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 48 | ngx_feature_run=no |
| 49 | ngx_feature_incs="#include <zlib.h>" |
Igor Sysoev | 0ec09f9 | 2006-11-27 11:07:09 +0000 | [diff] [blame] | 50 | ngx_feature_path= |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 51 | ngx_feature_libs="-lz" |
| 52 | ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)" |
| 53 | . auto/feature |
Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 54 | |
| 55 | |
Igor Sysoev | fff3232 | 2004-04-08 15:58:25 +0000 | [diff] [blame] | 56 | if [ $ngx_found = yes ]; then |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 57 | CORE_LIBS="$CORE_LIBS $ngx_feature_libs" |
Igor Sysoev | fff3232 | 2004-04-08 15:58:25 +0000 | [diff] [blame] | 58 | ZLIB=YES |
Igor Sysoev | c0edbcc | 2004-10-21 15:34:38 +0000 | [diff] [blame] | 59 | ngx_found=no |
Igor Sysoev | fff3232 | 2004-04-08 15:58:25 +0000 | [diff] [blame] | 60 | fi |
Igor Sysoev | dc867cd | 2003-12-14 20:10:27 +0000 | [diff] [blame] | 61 | fi |
| 62 | |
| 63 | fi |