]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Build: Change build to always use system leveldb
authorGary Lowell <glowell@inktank.com>
Sat, 16 Feb 2013 01:58:48 +0000 (17:58 -0800)
committerGary Lowell <glowell@inktank.com>
Wed, 27 Feb 2013 04:07:49 +0000 (20:07 -0800)
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>
autogen.sh
ceph.spec.in
configure.ac
debian/control
src/Makefile.am

index 9d6a77bae63d4c4f6b0a807f2fabdbb07cbba3b7..f90c49de20a3c6e4d1feea65d156abdd6ab3b333 100755 (executable)
@@ -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
index 2ba4c7533f3c0eb664fd76898251c4e82790b6ce..da05b44e234d67b1d9242c1b962ecf4b051bd881 100644 (file)
@@ -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++
index 2d445e55b0fac083ba0982bad2cb348ced38b1aa..c7bb3d0515cc269516d0db11be81b727a7819e50 100644 (file)
@@ -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],
index eefb4ee3b3097034388925efbbd808364edfff1b..85c9e1eb5ff78f5d18e0c6aac6fc0d0b2b8f9c74 100644 (file)
@@ -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
index 9c453df1f53b3be9a42b964214bf9ea6b6a004e2..9daf3f22182eb4a117d7ec13f75b8c15d95dfda5 100644 (file)
@@ -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