From 8cb1252d92e5cfea3804ef27edc01cac5b044ff3 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 19 Nov 2009 17:16:29 +0100 Subject: [PATCH] Add zlib dependency to gio Will be used by compression APIs --- configure.in | 11 +++++++++++ gio-2.0.pc.in | 1 + gio/Makefile.am | 1 + 3 files changed, 13 insertions(+) diff --git a/configure.in b/configure.in index 3cf30d7de..3fc113ad4 100644 --- a/configure.in +++ b/configure.in @@ -457,6 +457,17 @@ fi 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)]) + +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) dnl dnl gettext support dnl diff --git a/gio-2.0.pc.in b/gio-2.0.pc.in index baefef122..5c1bfe4c9 100644 --- a/gio-2.0.pc.in +++ b/gio-2.0.pc.in @@ -10,4 +10,5 @@ Description: glib I/O library Version: @VERSION@ Requires: glib-2.0,gobject-2.0,gmodule-no-export-2.0 Libs: -L${libdir} -lgio-2.0 +Libs.private: @ZLIB_LIBS@ Cflags: diff --git a/gio/Makefile.am b/gio/Makefile.am index 34355d228..45c89429e 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -284,6 +284,7 @@ libgio_2_0_la_LIBADD = \ $(top_builddir)/gobject/libgobject-2.0.la \ $(top_builddir)/gmodule/libgmodule-2.0.la \ $(platform_libadd) \ + $(ZLIB_LIBS) \ $(SELINUX_LIBS) \ $(GLIB_LIBS) \ $(XATTR_LIBS) \