includes = ''
if Options.options.ctdb_dir:
- CTDB_CFLAGS = '-I' + Options.options.ctdb_dir + '/include'
- includes = includes + ' ' + Options.options.ctdb_dir + '/include'
+ CTDB_INCLUDE = Options.options.ctdb_dir + '/include'
+ else:
+ CTDB_INCLUDE = conf.srcdir + '/ctdb/include'
+ includes = includes + ' ' + CTDB_INCLUDE
if not conf.env.USING_SYSTEM_TDB:
includes = includes + ' ' + srcdir + '/lib/tdb/include'
if have_cluster_support:
Logs.info("building with cluster support")
conf.env['CTDB_CFLAGS'] = CTDB_CFLAGS
+ conf.env['CTDB_INCLUDE'] = CTDB_INCLUDE
else:
if Options.options.with_cluster_support == False:
Logs.info("building without cluster support (--without-cluster-support)")
lib/sock_exec.c''',
deps='ndr samba-security NDR_SECURITY samba-util util_tdb ccan-hash')
-if bld.CONFIG_GET("CTDB_CFLAGS"):
+if bld.CONFIG_GET("CTDB_CFLAGS") and bld.CONFIG_GET("CTDB_INCLUDE"):
SAMBA_CLUSTER_SUPPORT_SOURCES='''
lib/cluster_support.c
lib/dbwrap/dbwrap_ctdb.c
source=SAMBA_CLUSTER_SUPPORT_SOURCES,
deps=SAMBA_CLUSTER_SUPPORT_DEPS,
cflags=bld.CONFIG_GET("CTDB_CFLAGS"),
+ includes=bld.CONFIG_GET("CTDB_INCLUDE"),
allow_undefined_symbols=True,
private_library=True)