[sheepdog] [PATCH v3 05/11] sheep: add option to disable shepherd driver
Liu Yuan
namei.unix at gmail.com
Sat Sep 21 18:12:22 CEST 2013
This is useful for people that don't want to compile any other drivers in the
sheep binary. Also is useful for driver patch to test drivers one by one.
Since it is not mature yet, we'd better disable it as default
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
configure.ac | 10 ++++++++++
sheep/Makefile.am | 6 ++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index b169ae7..0fed031 100644
--- a/configure.ac
+++ b/configure.ac
@@ -224,6 +224,11 @@ AC_ARG_ENABLE([zookeeper],
[ enable_zookeeper="no" ],)
AM_CONDITIONAL(BUILD_ZOOKEEPER, test x$enable_zookeeper = xyes)
+AC_ARG_ENABLE([shepherd],
+ [ --enable-shepherd : build shepherd cluster driver ],,
+ [ enable_shepherd="no" ],)
+AM_CONDITIONAL(BUILD_SHEPHERD, test x$enable_shepherd = xyes)
+
AC_ARG_WITH([initddir],
[ --with-initddir=DIR : path to init script directory. ],
[ INITDDIR="$withval" ],
@@ -302,6 +307,11 @@ if test "x${enable_zookeeper}" = xyes; then
PACKAGE_FEATURES="$PACKAGE_FEATURES zookeeper"
fi
+if test "x${enable_shepherd}" = xyes; then
+ AC_DEFINE_UNQUOTED([HAVE_SHEPHERD], 1, [have shepherd])
+ PACKAGE_FEATURES="$PACKAGE_FEATURES shepherd"
+fi
+
if test "x${enable_trace}" = xyes; then
if test "x${enable_coverage}" = xyes; then
AC_MSG_ERROR(tracer cannot be used with coverage options)
diff --git a/sheep/Makefile.am b/sheep/Makefile.am
index bc810be..351e011 100644
--- a/sheep/Makefile.am
+++ b/sheep/Makefile.am
@@ -27,8 +27,7 @@ sbin_PROGRAMS = sheep
sheep_SOURCES = sheep.c group.c request.c gateway.c store.c vdi.c \
journal.c ops.c recovery.c cluster/local.c \
object_cache.c object_list_cache.c \
- plain_store.c config.c migrate.c md.c \
- cluster/shepherd.c
+ plain_store.c config.c migrate.c md.c
if BUILD_HTTP
sheep_SOURCES += http.c
@@ -39,6 +38,9 @@ endif
if BUILD_ZOOKEEPER
sheep_SOURCES += cluster/zookeeper.c
endif
+if BUILD_SHEPHERD
+sheep_SOURCES += cluster/shepherd.c
+endif
if BUILD_TRACE
sheep_SOURCES += trace/trace.c trace/mcount.S trace/graph.c trace/checker.c
--
1.7.9.5
More information about the sheepdog
mailing list