[glib] Add zlib dependency to gio



commit 8cb1252d92e5cfea3804ef27edc01cac5b044ff3
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Nov 19 17:16:29 2009 +0100

    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(+), 0 deletions(-)
---
diff --git a/configure.in b/configure.in
index 3cf30d7..3fc113a 100644
--- a/configure.in
+++ b/configure.in
@@ -458,6 +458,17 @@ 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 baefef1..5c1bfe4 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 34355d2..45c8942 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) 					\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]