diff options
| author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-09-06 03:03:46 +0200 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2014-09-07 23:16:11 -0700 | 
| commit | e3817aa6cab71e42f7e611d75abf0f433b88d907 (patch) | |
| tree | 39ce323b59ddc76f5c54f317c240679c9cdb0de7 | |
| parent | 2efe31d4def8bd9170d000d0c4a05a4d00633805 (diff) | |
Search zlib without pkg-config
NetBSD has zlib installed in base system and no .pc file for it. In
order to discover it, fallback to AC_CHECK_LIB is PKG_CHECK_MODULES
fail to find it.
This is a backport of Ide84402aa38edc2709d12e2530401c6b8c722529
and I34ded175f056d1a0898804fe602e3d2d2cba27f5
BUG: 1138897
Change-Id: I14a3ab987cf2bedd3d1d00145466647fb646795b
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8628
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
| -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 \  | 
