# ZLIB_CHECK_CONFIG ([DEFAULT-ACTION])
# ----------------------------------------------------------
# This macro #defines HAVE_ZLIB_H if required header files are
# found, and sets @ZLIB_LDFLAGS@ and @ZLIB_CFLAGS@ to the necessary
# This macro is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_DEFUN([ZLIB_TRY_LINK],
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
deflateInit(&defstream, Z_BEST_COMPRESSION);
]])],[found_zlib="yes"],[])
AC_DEFUN([ZLIB_CHECK_CONFIG],
If you want to specify zlib installation directories:
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.])],
test "x$withval" = "xyes" && withval=/usr
ZLIB_CFLAGS="-I$withval/include"
ZLIB_LDFLAGS="-L$withval/lib"
AC_ARG_WITH([zlib-include],
AS_HELP_STRING([--with-zlib-include=DIR],
[use zlib include headers from given path.]
AS_HELP_STRING([--with-zlib-lib=DIR],
[use zlib libraries from given path.]
ZLIB_LDFLAGS="-L$withval"
AC_MSG_CHECKING(for zlib support)
if test -n "$_zlib_dir_set" -o -f /usr/include/zlib.h; then