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
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"