[glib] Check for zlib using pkg-config
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Check for zlib using pkg-config
- Date: Thu, 8 Jul 2010 18:14:09 +0000 (UTC)
commit 1e8656fe24e846f3bb0533e96afb1e0b46a37b49
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 8 14:12:28 2010 -0400
Check for zlib using pkg-config
Based on a patch by Felipe Contreras, see bug 623473.
configure.in | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/configure.in b/configure.in
index 437d34b..7925026 100644
--- a/configure.in
+++ b/configure.in
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]