diff options
| -rw-r--r-- | configure.ac | 19 | ||||
| -rw-r--r-- | xlators/features/qemu-block/src/Makefile.am | 2 |
2 files changed, 13 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 8c53d02851b..583f500e961 100644 --- a/configure.ac +++ b/configure.ac @@ -585,13 +585,18 @@ AC_SUBST(SYNCDAEMON_COMPILE) AC_SUBST(SYNCDAEMON_SUBDIR) # end SYNCDAEMON section -# CDC xlator - check if libz is present if so enable HAVE_LIB_Z -echo -n "checking if libz is present... " - -PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0], - [echo "yes (features requiring zlib enabled)" AC_DEFINE(HAVE_LIB_Z, 1, [define if zlib is present])], - [echo "no"] ) - +# CDC xlator - check if libz is present if so enable HAVE_LIB_Z +BUILD_CDC=yes +PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0],, + [AC_CHECK_LIB([z], [deflate], [ZLIB_LIBS="-lz"], + [BUILD_CDC=no])]) +echo -n "features requiring zlib enabled: " +if test "x$BUILD_CDC" = "xyes" ; then + echo "yes" + AC_DEFINE(HAVE_LIB_Z, 1, [define if zlib is present]) +else + echo "no" +fi AC_SUBST(LIBZ_CFLAGS) AC_SUBST(LIBZ_LIBS) # end CDC xlator secion diff --git a/xlators/features/qemu-block/src/Makefile.am b/xlators/features/qemu-block/src/Makefile.am index 08a7b62a0db..de14a971e2a 100644 --- a/xlators/features/qemu-block/src/Makefile.am +++ b/xlators/features/qemu-block/src/Makefile.am @@ -3,7 +3,7 @@ xlator_LTLIBRARIES = qemu-block.la xlatordir = $(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator/features qemu_block_la_LDFLAGS = -module -avoid-version -qemu_block_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GLIB_LIBS) -lz -lrt +qemu_block_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(GLIB_LIBS) $(ZLIB_LIBS) -lrt qemu_block_la_SOURCES_qemu = \ $(CONTRIBDIR)/qemu/qemu-coroutine.c \ |
