diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | src/Makefile.am | 20 | ||||
m--------- | src/libs3 | 0 |
4 files changed, 37 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules index 2bfe0fa6852..c5a0932b7af 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "src/leveldb"] path = src/leveldb url = git://github.com/ceph/leveldb.git +[submodule "src/libs3"] + path = src/libs3 + url = git://github.com/ceph/libs3.git diff --git a/configure.ac b/configure.ac index b6ff4e3faa5..f7b0b9304d6 100644 --- a/configure.ac +++ b/configure.ac @@ -308,6 +308,24 @@ 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 libs3? +AC_ARG_WITH([system-libs3], + [AS_HELP_STRING([--with-system-libs3], [use system libs3])], + , + [with_system_libs3=no]) +AS_IF([test "x$with_system_libs3" = xyes], + [AC_CHECK_LIB([s3], [S3_initialize], [true], [AC_MSG_FAILURE([libs3 not found])], [-lpthread])]) +AS_IF([test "x$with_system_libs3" = xcheck], + [AC_SEARCH_LIBS([S3_initialize], [s3], [with_system_libs3=yes], [true], [-lpthread])]) +AM_CONDITIONAL(WITH_SYSTEM_LIBS3, [ test "$with_system_libs3" = "yes" ]) + +# rest-bench? +AC_ARG_WITH([rest-bench], + [AS_HELP_STRING([--with-rest-bench], [enables rest-bench])], + [], + [with_rest_bench=no]) +AM_CONDITIONAL(WITH_REST_BENCH, [ test "$with_rest_bench" = "yes" ]) + # use libaio? AC_ARG_WITH([libaio], [AS_HELP_STRING([--without-libaio], [disable libaio use by journal])], diff --git a/src/Makefile.am b/src/Makefile.am index 92aa9b6b60d..7ac82fdb7d5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = gnu -SUBDIRS = ocf -DIST_SUBDIRS = gtest ocf leveldb +SUBDIRS = ocf libs3 +DIST_SUBDIRS = gtest ocf leveldb libs3 CLEANFILES = bin_PROGRAMS = # like bin_PROGRAMS, but these targets are only built for debug builds @@ -322,10 +322,23 @@ rados_SOURCES = rados.cc rados_import.cc rados_export.cc rados_sync.cc common/ob rados_LDADD = libglobal.la librados.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS) bin_PROGRAMS += rados +if WITH_REST_BENCH + rest_bench_SOURCES = tools/rest_bench.cc common/obj_bencher.cc -rest_bench_LDADD = libglobal.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS) -ls3 +rest_bench_LDADD = libglobal.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS) +rest_bench_CXXFLAGS = ${AM_CXXFLAGS} bin_PROGRAMS += rest-bench +if WITH_SYSTEM_LIBS3 +rest_bench_LDADD += -ls3 +else +rest_bench_LDADD += libs3/build/lib/libs3.a -lcurl -lxml2 +rest_bench_CXXFLAGS += -I$(top_srcdir)/src/libs3/inc +SUBDIRS += libs3 +endif + +endif + scratchtool_SOURCES = scratchtool.c scratchtool_LDADD = librados.la $(PTHREAD_LIBS) -lm $(CRYPTO_LIBS) $(EXTRALIBS) scratchtoolpp_SOURCES = scratchtoolpp.cc @@ -1657,7 +1670,6 @@ if WITH_DEBUG bin_PROGRAMS += $(bin_DEBUGPROGRAMS) endif - project.tgz: clean cov-configure -co /usr/bin/gcc cov-configure -co /usr/bin/g++ diff --git a/src/libs3 b/src/libs3 new file mode 160000 +Subproject 7165f83c53b05629bc162765808fabc06f1e730 |