Source
7
7
# found, and sets @ZLIB_LDFLAGS@ and @ZLIB_CFLAGS@ to the necessary
8
8
# values.
9
9
#
10
10
# This macro is distributed in the hope that it will be useful,
11
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
13
14
14
AC_DEFUN([ZLIB_TRY_LINK],
15
15
[
16
16
found_zlib=$1
17
-
AC_TRY_LINK(
18
-
[
17
+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
19
18
#include <zlib.h>
20
-
],
21
-
[
19
+
]], [[
22
20
z_stream defstream;
23
21
deflateInit(&defstream, Z_BEST_COMPRESSION);
24
-
],
25
-
found_zlib="yes")
22
+
]])],[found_zlib="yes"],[])
26
23
])dnl
27
24
28
25
AC_DEFUN([ZLIB_CHECK_CONFIG],
29
26
[
30
27
AC_ARG_WITH([zlib],[
31
28
If you want to specify zlib installation directories:
32
-
AC_HELP_STRING([--with-zlib@<:@=DIR@:>@], [use zlib from given base install directory (DIR), default is to search through a number of common places for the zlib files.])],
29
+
AS_HELP_STRING([--with-zlib@<:@=DIR@:>@],[use zlib from given base install directory (DIR), default is to search through a number of common places for the zlib files.])],
33
30
[
34
31
test "x$withval" = "xyes" && withval=/usr
35
32
ZLIB_CFLAGS="-I$withval/include"
36
33
ZLIB_LDFLAGS="-L$withval/lib"
37
34
_zlib_dir_set="yes"
38
35
]
39
36
)
40
37
41
38
AC_ARG_WITH([zlib-include],
42
-
AC_HELP_STRING([--with-zlib-include=DIR],
43
-
[use zlib include headers from given path.]
44
-
),
39
+
AS_HELP_STRING([--with-zlib-include=DIR],[use zlib include headers from given path.
40
+
]),
45
41
[
46
42
ZLIB_CFLAGS="-I$withval"
47
43
_zlib_dir_set="yes"
48
44
]
49
45
)
50
46
51
47
AC_ARG_WITH([zlib-lib],
52
-
AC_HELP_STRING([--with-zlib-lib=DIR],
53
-
[use zlib libraries from given path.]
54
-
),
48
+
AS_HELP_STRING([--with-zlib-lib=DIR],[use zlib libraries from given path.
49
+
]),
55
50
[
56
51
ZLIB_LDFLAGS="-L$withval"
57
52
_zlib_dir_set="yes"
58
53
]
59
54
)
60
55
61
56
AC_MSG_CHECKING(for zlib support)
62
57
63
58
ZLIB_LIBS="-lz"
64
59