diff options
author | Gary Lowell <glowell@inktank.com> | 2013-02-15 17:58:48 -0800 |
---|---|---|
committer | Gary Lowell <glowell@inktank.com> | 2013-02-26 20:07:49 -0800 |
commit | ea546aef0c86da521f8a360d4bfd10315af3f46b (patch) | |
tree | 23981938b640363b02cf633af1bcf16a58af0401 | |
parent | a34e7c6f6b266060bff7f4522a92d56e6820455b (diff) | |
download | ceph-ea546aef0c86da521f8a360d4bfd10315af3f46b.tar.gz |
Build: Change build to always use system leveldb
Dynamically link to the leveldb installed on the system rather than
statically linking ceph copy. Remove the --with-system-leveldb config
option, and add a requirement for leveldb libraries for rpm and debian
packages. Bug 3945.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
-rwxr-xr-x | autogen.sh | 1 | ||||
-rw-r--r-- | ceph.spec.in | 1 | ||||
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | src/Makefile.am | 9 |
5 files changed, 6 insertions, 20 deletions
diff --git a/autogen.sh b/autogen.sh index 9d6a77bae63..f90c49de20a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -19,5 +19,4 @@ autoconf autoheader automake -a --add-missing -Wall ( cd src/gtest && autoreconf -fvi; ) -( cd src/leveldb && mkdir -p m4 && autoreconf -fvi; ) exit diff --git a/ceph.spec.in b/ceph.spec.in index 2ba4c7533f3..da05b44e234 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -25,6 +25,7 @@ Requires: librbd1 = %{version}-%{release} Requires: librados2 = %{version}-%{release} Requires: libcephfs1 = %{version}-%{release} Requires: python +Requires: leveldb > 1.2 Requires(post): binutils BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ diff --git a/configure.ac b/configure.ac index 2d445e55b0f..c7bb3d0515c 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,6 @@ AC_MSG_NOTICE([RPM_RELEASE='$RPM_RELEASE']) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SUBDIRS([src/gtest]) -AC_CONFIG_SUBDIRS([src/leveldb]) # Environment AC_CANONICAL_HOST @@ -413,16 +412,8 @@ AC_ARG_WITH([ocf], [with_ocf=no]) AM_CONDITIONAL(WITH_OCF, [ test "$with_ocf" = "yes" ]) -# use system leveldb? -AC_ARG_WITH([system-leveldb], - [AS_HELP_STRING([--with-system-leveldb], [use system leveldb])], - , - [with_system_leveldb=no]) -AS_IF([test "x$with_system_leveldb" = xyes], - [AC_CHECK_LIB([leveldb], [leveldb_open], [], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread])]) -AS_IF([test "x$with_system_leveldb" = xcheck], - [AC_CHECK_LIB([leveldb], [leveldb_open], [with_system_leveldb=yes], [], [-lsnappy -lpthread])]) -AM_CONDITIONAL(WITH_SYSTEM_LEVELDB, [ test "$with_system_leveldb" = "yes" ]) +# use system leveldb +AC_CHECK_LIB([leveldb], [leveldb_open], [], [AC_MSG_FAILURE([libleveldb not found])], [-lsnappy -lpthread]) # use system libs3? AC_ARG_WITH([system-libs3], diff --git a/debian/control b/debian/control index eefb4ee3b30..85c9e1eb5ff 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Standards-Version: 3.9.3 Package: ceph Architecture: linux-any -Depends: ${shlibs:Depends}, ${misc:Depends}, sdparm | hdparm, binutils, ceph-common, uuid-runtime, python, xfsprogs, gdisk, parted +Depends: ${shlibs:Depends}, ${misc:Depends}, sdparm | hdparm, binutils, ceph-common, uuid-runtime, python, xfsprogs, gdisk, parted, libleveldb1 (> 1.2) Recommends: ceph-mds, librados2, librbd1, btrfs-tools Description: distributed storage and file system Ceph is a distributed storage system designed to provide excellent diff --git a/src/Makefile.am b/src/Makefile.am index 9c453df1f53..9daf3f22182 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = gnu SUBDIRS = ocf java -DIST_SUBDIRS = gtest ocf leveldb libs3 java +DIST_SUBDIRS = gtest ocf libs3 java EXTRA_DIST = \ libs3/COPYING \ @@ -64,14 +64,9 @@ if WITH_LIBAIO LIBOS_LDA += -laio endif -if WITH_SYSTEM_LEVELDB +# use system leveldb LIBOS_LDA += -lleveldb -lsnappy LEVELDB_INCLUDE = -else -LIBOS_LDA += leveldb/libleveldb.a -SUBDIRS += leveldb -LEVELDB_INCLUDE = -I$(top_srcdir)/src/leveldb/include -endif # monitor ceph_mon_SOURCES = ceph_mon.cc |