Add zlib dependency to gio
authorAlexander Larsson <alexl@redhat.com>
Thu, 19 Nov 2009 16:16:29 +0000 (17:16 +0100)
committerAlexander Larsson <alexl@redhat.com>
Mon, 23 Nov 2009 15:22:52 +0000 (16:22 +0100)
Will be used by compression APIs

configure.in
gio-2.0.pc.in
gio/Makefile.am

index 3cf30d7de8f6c2c3bb02f6f10276ead9aa5c8f93..3fc113ad443de816abc50bd7c2a6fd3bd32857c5 100644 (file)
@@ -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
index baefef12205c6c242138401ee896372e66164cfe..5c1bfe4c9d8f3954f3013b43efc5e07800f4b405 100644 (file)
@@ -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: 
index 34355d2280aa8a7ee55a1602e2925c75afb87cf6..45c89429e138c78b39a9082f63ace1dcedcd0b6e 100644 (file)
@@ -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)                                   \