1
1
dnl @synopsis CHECK_ZLIB()
3
dnl This macro searches for an installed zlib library. If nothing was
4
dnl specified when calling configure, it searches first in /usr/local
3
dnl This macro searches for an installed zlib library. If nothing
4
dnl was specified when calling configure, it searches first in /usr/local
5
5
dnl and then in /usr. If the --with-zlib=DIR is specified, it will try
6
dnl to find it in DIR/include/zlib.h and DIR/lib/libz.a. If
7
dnl --without-zlib is specified, the library is not searched at all.
6
dnl to find it in DIR/include/zlib.h and DIR/lib/libz.a. If --without-zlib
7
dnl is specified, the library is not searched at all.
9
9
dnl If either the header file (zlib.h) or the library (libz) is not
10
dnl found, the configuration exits on error, asking for a valid zlib
11
dnl installation directory or --without-zlib.
10
dnl found, the configuration exits on error, asking for a valid
11
dnl zlib installation directory or --without-zlib.
13
dnl The macro defines the symbol HAVE_LIBZ if the library is found. You
14
dnl should use autoheader to include a definition for this symbol in a
15
dnl config.h file. Sample usage in a C/C++ source is as follows:
13
dnl The macro defines the symbol HAVE_LIBZ if the library is found. You should
14
dnl use autoheader to include a definition for this symbol in a config.h
15
dnl file. Sample usage in a C/C++ source is as follows:
17
17
dnl #ifdef HAVE_LIBZ
18
18
dnl #include <zlib.h>
19
19
dnl #endif /* HAVE_LIBZ */
21
dnl @category InstalledPackages
22
22
dnl @author Loic Dachary <loic@senga.org>
23
dnl @version 2004-09-20
24
dnl @license GPLWithACException
26
25
AC_DEFUN([CHECK_ZLIB],
34
33
--without-zlib to disable zlib usage completely],
35
34
[if test "$withval" != no ; then
41
AC_MSG_WARN([Sorry, $withval does not exist, checking usual places])
47
41
ZLIB_HOME=/usr/local
48
42
if test ! -f "${ZLIB_HOME}/include/zlib.h"
54
49
# Locate zlib, if wanted