summaryrefslogtreecommitdiff
path: root/ctdb/wscript
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2018-07-09 14:53:00 +0200
committerDavid Disseldorp <ddiss@samba.org>2018-08-09 13:29:15 +0200
commitbd64af6b8861f892e6ae2840a493f037d1e0a06c (patch)
treee14cb3ff39045f206280b53dea1c013cee54b393 /ctdb/wscript
parent9b105651c754c7c98297a23c0c1e43d7d2e28139 (diff)
downloadsamba-bd64af6b8861f892e6ae2840a493f037d1e0a06c.tar.gz
ctdb/build: link ctdb_mutex_ceph_rados_helper against ceph-common
ceph-common linkage is needed with new versions of Ceph. Also respect the --libcephfs_dir=<path> parameter when provided. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/wscript')
-rw-r--r--ctdb/wscript14
1 files changed, 13 insertions, 1 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index 05044cebdeb..addf8ece173 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -85,6 +85,10 @@ def set_options(opt):
opt.add_option('--enable-etcd-reclock',
help=("Enable etcd recovery lock helper (default=no)"),
action="store_true", dest='ctdb_etcd_reclock', default=False)
+
+ opt.add_option('--with-libcephfs',
+ help=("Directory under which libcephfs is installed"),
+ action="store", dest='libcephfs_dir', default=None)
opt.add_option('--enable-ceph-reclock',
help=("Enable Ceph CTDB recovery lock helper (default=no)"),
action="store_true", dest='ctdb_ceph_reclock', default=False)
@@ -237,8 +241,16 @@ def configure(conf):
conf.env.etcd_reclock = have_etcd_reclock
if Options.options.ctdb_ceph_reclock:
+ # Use custom libcephfs library path if provided. XXX The top level build
+ # explicitly sets LIBPATH_CEPH-COMMON when libcephfs_dir isn't provided.
+ if Options.options.libcephfs_dir:
+ conf.env['CPPPATH_RADOS'] = Options.options.libcephfs_dir + '/include'
+ conf.env['LIBPATH_RADOS'] = Options.options.libcephfs_dir + '/lib'
+ conf.env['LIBPATH_CEPH-COMMON'] = conf.env['LIBPATH_RADOS'] + '/ceph'
+
if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
conf.CHECK_LIB('rados', shlib=True)):
+ conf.CHECK_LIB('ceph-common', shlib=True)
Logs.info('Building with Ceph librados recovery lock support')
conf.define('HAVE_LIBRADOS', 1)
else:
@@ -665,7 +677,7 @@ def build(bld):
if bld.env.HAVE_LIBRADOS:
bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
- deps='talloc tevent rados',
+ deps='talloc tevent rados ceph-common',
includes='include',
install_path='${CTDB_HELPER_BINDIR}')