summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/lib/ctdb_conn.c4
-rw-r--r--source3/lib/ctdb_dummy.c4
-rw-r--r--source3/lib/ctdbd_conn.c4
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c4
-rw-r--r--source3/lib/messages_ctdbd.c4
-rw-r--r--source3/torture/test_ctdbconn.c4
-rwxr-xr-xsource3/wscript_build24
7 files changed, 18 insertions, 30 deletions
diff --git a/source3/lib/ctdb_conn.c b/source3/lib/ctdb_conn.c
index 214ea9799ae..09965118d5d 100644
--- a/source3/lib/ctdb_conn.c
+++ b/source3/lib/ctdb_conn.c
@@ -21,8 +21,6 @@
#include "lib/util/tevent_unix.h"
#include "ctdb_conn.h"
-#ifdef CLUSTER_SUPPORT
-
#include <tdb.h>
#ifdef HAVE_CTDB_PROTOCOL_H
@@ -553,5 +551,3 @@ int ctdb_msg_read_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
*pmsg_len = msg->datalen;
return 0;
}
-
-#endif
diff --git a/source3/lib/ctdb_dummy.c b/source3/lib/ctdb_dummy.c
index e2b7c17e4c6..4b360a8b06f 100644
--- a/source3/lib/ctdb_dummy.c
+++ b/source3/lib/ctdb_dummy.c
@@ -25,8 +25,6 @@
#include "lib/dbwrap/dbwrap_ctdb.h"
#include "torture/proto.h"
-#ifndef CLUSTER_SUPPORT
-
NTSTATUS ctdbd_probe(void)
{
return NT_STATUS_NOT_IMPLEMENTED;
@@ -180,5 +178,3 @@ bool run_ctdb_conn(int dummy)
{
return true;
}
-
-#endif
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index ae4f7bbfba3..bde9dae76bb 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -23,8 +23,6 @@
#include "serverid.h"
#include "ctdbd_conn.h"
-#ifdef CLUSTER_SUPPORT
-
#include "ctdb_packet.h"
#include "messages.h"
@@ -1885,5 +1883,3 @@ NTSTATUS ctdbd_probe(void)
return status;
}
-
-#endif
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 42c9a684261..b1133445342 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -27,8 +27,6 @@
#include "dbwrap/dbwrap_rbt.h"
#include "lib/param/param.h"
-#ifdef CLUSTER_SUPPORT
-
/*
* It is not possible to include ctdb.h and tdb_compat.h (included via
* some other include above) without warnings. This fixes those
@@ -1709,5 +1707,3 @@ struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx,
return result;
}
-
-#endif
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index 200734da9a3..230560f8cfe 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -21,8 +21,6 @@
#include "messages.h"
#include "util_tdb.h"
-#ifdef CLUSTER_SUPPORT
-
/*
* It is not possible to include ctdb.h and tdb_compat.h (included via
* some other include above) without warnings. This fixes those
@@ -168,5 +166,3 @@ NTSTATUS messaging_ctdbd_init(struct messaging_context *msg_ctx,
*presult = result;
return NT_STATUS_OK;
}
-
-#endif
diff --git a/source3/torture/test_ctdbconn.c b/source3/torture/test_ctdbconn.c
index d8f744c24b8..ff45a022d33 100644
--- a/source3/torture/test_ctdbconn.c
+++ b/source3/torture/test_ctdbconn.c
@@ -20,8 +20,6 @@
#include "includes.h"
#include "torture/proto.h"
-#ifdef CLUSTER_SUPPORT
-
#include "ctdb_conn.h"
#include "ctdbd_conn.h"
#include "lib/util/tevent_unix.h"
@@ -243,5 +241,3 @@ bool run_ctdb_conn(int dummy)
TALLOC_FREE(ev);
return (ret == 0);
}
-
-#endif
diff --git a/source3/wscript_build b/source3/wscript_build
index 9fc33ceb1c5..02a5c7d58a7 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -270,22 +270,34 @@ bld.SAMBA3_SUBSYSTEM('samba3util',
lib/sock_exec.c''',
deps='ndr samba-security NDR_SECURITY samba-util util_tdb ccan-hash')
-bld.SAMBA3_LIBRARY('samba-cluster-support',
- source='''
+if bld.CONFIG_GET("CTDB_CFLAGS"):
+ SAMBA_CLUSTER_SUPPORT_SOURCES='''
lib/cluster_support.c
- lib/ctdb_dummy.c
lib/dbwrap/dbwrap_ctdb.c
lib/messages_ctdbd.c
lib/ctdb_packet.c
lib/ctdbd_conn.c
lib/ctdb_conn.c
torture/test_ctdbconn.c
- ''',
- deps='''
+ '''
+ SAMBA_CLUSTER_SUPPORT_DEPS='''
talloc
tevent
tdb
- ''',
+ '''
+else:
+ SAMBA_CLUSTER_SUPPORT_SOURCES='''
+ lib/cluster_support.c
+ lib/ctdb_dummy.c
+ '''
+ SAMBA_CLUSTER_SUPPORT_DEPS='''
+ talloc
+ tevent
+ '''
+
+bld.SAMBA3_LIBRARY('samba-cluster-support',
+ source=SAMBA_CLUSTER_SUPPORT_SOURCES,
+ deps=SAMBA_CLUSTER_SUPPORT_DEPS,
cflags=bld.CONFIG_GET("CTDB_CFLAGS"),
allow_undefined_symbols=True,
private_library=True)