diff options
author | Emmanuel Dreyfus <manu@netbsd.org> | 2014-08-08 12:01:34 +0200 |
---|---|---|
committer | Harshavardhana <harsha@harshavardhana.net> | 2014-08-09 15:29:26 -0700 |
commit | b97ade3b05acf3784b0df11421e6b78fca0cfe85 (patch) | |
tree | 050b6c768703986cbe895d810dfb0813e829766b /configure.ac | |
parent | 31a0dbb21ebfaa2b25f6b407cbdbb5da1509db29 (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 enables cdc xlator, and we pass tests/basic/cdc.t
BUG: 764655
Change-Id: Ide84402aa38edc2709d12e2530401c6b8c722529
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 35d5bb0f372..4baa126254f 100644 --- a/configure.ac +++ b/configure.ac @@ -614,13 +614,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], [LIBZ_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 |