Check for zlib using pkg-config

Based on a patch by Felipe Contreras, see bug 623473.
This commit is contained in:
Matthias Clasen 2010-07-08 14:12:28 -04:00
parent 5adf506d5b
commit 1e8656fe24

View File

@ -460,14 +460,16 @@ AC_MSG_RESULT($enable_iconv_cache)
dnl
dnl zlib support
dnl
found_zlib=no
AC_CHECK_LIB(z, inflate, [AC_CHECK_HEADER(zlib.h, found_zlib=yes)])
PKG_CHECK_MODULES([ZLIB], [zlib], [found_zlib=yes], [found_zlib=no])
if test "x$found_zlib" = "xno" ; then
AC_MSG_ERROR([*** Working zlib library and headers not found ***])
AC_CHECK_LIB(z, inflate, [AC_CHECK_HEADER(zlib.h, found_zlib=yes)])
if test "x$found_zlib" = "xno" ; then
AC_MSG_ERROR([*** Working zlib library and headers not found ***])
fi
ZLIB_LIBS='-lz'
AC_SUBST(ZLIB_LIBS)
fi
ZLIB_LIBS='-lz'
AC_SUBST(ZLIB_LIBS)
dnl
dnl gettext support
dnl