annotate auto/lib/zlib/conf @ 9316:b40149d062cb

Win32: checking for system PCRE, zlib, and OpenSSL libs. Checking for system libs on Windows is beneficial when compiling in MSYS2 environments with GCC or Clang, as most libraries are readily available.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 07 Aug 2024 03:58:50 +0300
parents 78f8ac479735
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
444
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
1
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
2 # Copyright (C) Igor Sysoev
4412
d620f497c50f Copyright updated.
Maxim Konovalov <maxim@nginx.com>
parents: 3684
diff changeset
3 # Copyright (C) Nginx, Inc.
444
42d11f017717 nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents: 320
diff changeset
4
210
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
5
253
b6793bc5034b nginx-0.0.2-2004-02-09-10:46:43 import
Igor Sysoev <igor@sysoev.ru>
parents: 210
diff changeset
6 if [ $ZLIB != NONE ]; then
297
ee394e997c77 nginx-0.0.3-2004-03-29-21:43:58 import
Igor Sysoev <igor@sysoev.ru>
parents: 295
diff changeset
7 CORE_INCS="$CORE_INCS $ZLIB"
210
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
8
455
295d97d70c69 nginx-0.1.2-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 444
diff changeset
9 case "$NGX_CC_NAME" in
282
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
10
6397
78f8ac479735 Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4987
diff changeset
11 msvc | owc | bcc)
4987
66d001c5378c Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents: 4412
diff changeset
12 have=NGX_ZLIB . auto/have
282
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
13 LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
14 CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
15 ;;
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
16
6397
78f8ac479735 Win32: simplified and improved handling of MSVC versions.
Maxim Dounin <mdounin@mdounin.ru>
parents: 4987
diff changeset
17 icc)
4987
66d001c5378c Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents: 4412
diff changeset
18 have=NGX_ZLIB . auto/have
288
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
19 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
20
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
21 # to allow -ipo optimization we link with the *.o but not library
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
22 CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o"
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
23 CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o"
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
24 CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o"
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
25 CORE_LIBS="$CORE_LIBS $ZLIB/trees.o"
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
26 CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o"
493
975f62e77f02 nginx-0.1.21-RELEASE import
Igor Sysoev <igor@sysoev.ru>
parents: 469
diff changeset
27 CORE_LIBS="$CORE_LIBS $ZLIB/compress.o"
288
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
28
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
29 if [ $ZLIB_ASM != NO ]; then
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
30 CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
31 fi
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
32 ;;
f81d075ad172 nginx-0.0.2-2004-03-14-23:46:25 import
Igor Sysoev <igor@sysoev.ru>
parents: 282
diff changeset
33
282
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
34 *)
4987
66d001c5378c Configure: added the NGX_ZLIB define.
Valentin Bartenev <vbart@nginx.com>
parents: 4412
diff changeset
35 have=NGX_ZLIB . auto/have
282
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
36 LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
306
6b91bfbc4123 nginx-0.0.3-2004-04-05-00:32:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 297
diff changeset
37 CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
6b91bfbc4123 nginx-0.0.3-2004-04-05-00:32:09 import
Igor Sysoev <igor@sysoev.ru>
parents: 297
diff changeset
38 #CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
282
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
39 ;;
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
40
30310107dbc9 nginx-0.0.2-2004-03-09-22:47:07 import
Igor Sysoev <igor@sysoev.ru>
parents: 253
diff changeset
41 esac
210
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
42
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
43 else
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
44
9316
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
45 ZLIB=NO
320
d621239c30f7 nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents: 307
diff changeset
46
9316
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
47 # FreeBSD, Solaris, Linux
320
d621239c30f7 nginx-0.0.3-2004-04-18-23:06:02 import
Igor Sysoev <igor@sysoev.ru>
parents: 307
diff changeset
48
9316
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
49 ngx_feature="zlib library"
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
50 ngx_feature_name="NGX_ZLIB"
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
51 ngx_feature_run=no
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
52 ngx_feature_incs="#include <zlib.h>"
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
53 ngx_feature_path=
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
54 ngx_feature_libs="-lz"
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
55 ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
56 . auto/feature
210
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
57
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
58
9316
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
59 if [ $ngx_found = yes ]; then
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
60 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
61 ZLIB=YES
b40149d062cb Win32: checking for system PCRE, zlib, and OpenSSL libs.
Maxim Dounin <mdounin@mdounin.ru>
parents: 6397
diff changeset
62 ngx_found=no
3684
4d47a0658e7d stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents: 2893
diff changeset
63 fi
2893
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
64
3684
4d47a0658e7d stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents: 2893
diff changeset
65 if [ $ZLIB != YES ]; then
2893
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
66 cat << END
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
67
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
68 $0: error: the HTTP gzip module requires the zlib library.
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
69 You can either disable the module by using --without-http_gzip_module
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
70 option, or install the zlib library into the system, or build the zlib library
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
71 statically from the source with nginx by using --with-zlib=<path> option.
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
72
da1ba8a5c8c9 stop ./configure at once on library failure
Igor Sysoev <igor@sysoev.ru>
parents: 875
diff changeset
73 END
3684
4d47a0658e7d stop ./configure on Win32 if no library sources was specified,
Igor Sysoev <igor@sysoev.ru>
parents: 2893
diff changeset
74 exit 1
210
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
75 fi
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
76
00cafae0bdf1 nginx-0.0.1-2003-12-14-23:10:27 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff changeset
77 fi