Merge pull request #7030 from ceph/wip-detect-bz2-lz4

configure: detect bz2 and lz4

Reviewed-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
Loic Dachary 2016-01-04 14:39:40 +01:00
commit 99c7d9a156
4 changed files with 14 additions and 3 deletions

View File

@ -167,7 +167,6 @@ BuildRequires: libatomic-ops-devel
%if 0%{?_with_systemd}
Requires: systemd
%endif
BuildRequires: bzip2-devel
BuildRequires: nss-devel
BuildRequires: keyutils-libs-devel
BuildRequires: libatomic_ops-devel

View File

@ -819,6 +819,13 @@ AS_IF([test "x$with_librocksdb_static" = "xyes"],
AM_CONDITIONAL(WITH_SLIBROCKSDB, [ test "x$with_librocksdb_static" = "xyes" ])
AM_CONDITIONAL(WITH_LIBROCKSDB, [ test "x$with_librocksdb_static" = "xyes" -o "x$with_librocksdb" = "xyes" ])
# rocksdb detects bzlib and lz4 in its Makefile, which forces us to do the same.
AS_IF([test "x$with_librocksdb_static" = "xyes"], [
AC_CHECK_HEADER([bzlib.h], [have_bzlib=yes])
AC_CHECK_HEADER([lz4.h], [have_lz4=yes])])
AM_CONDITIONAL(HAVE_BZLIB, [test "x$have_bzlib" = "xyes"])
AM_CONDITIONAL(HAVE_LZ4, [test "x$have_lz4" = "xyes"])
# error out if --with-jemalloc and --with-librocksdb_static as rocksdb uses tcmalloc
if test "x$with_jemalloc" = "xyes"; then
if test "x$with_librocksdb_static" != "xno"; then

1
debian/control vendored
View File

@ -10,7 +10,6 @@ Uploaders: Ken Dreyer <kdreyer@redhat.com>,
Build-Depends: autoconf,
automake,
autotools-dev,
libbz2-dev,
cmake,
cryptsetup-bin | cryptsetup,
cython,

View File

@ -266,8 +266,14 @@ LIBOSD += $(LIBOSD_TYPES) $(LIBOS_TYPES)
# libkv/libos linking order is ornery
if WITH_SLIBROCKSDB
LIBKV += rocksdb/librocksdb.a
if HAVE_BZLIB
LIBKV += -lbz2
endif
LIBKV += -lbz2 -lz -lleveldb -lsnappy
if HAVE_LZ4
LIBKV += -llz4
endif
endif # WITH_SLIBROCKSDB
LIBKV += -lz -lleveldb -lsnappy
LIBOS += $(LIBOS_TYPES) $(LIBKV)
LIBMON += $(LIBMON_TYPES)