summaryrefslogtreecommitdiff
path: root/ctdb/wscript
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-09-15 16:10:16 +1000
committerMartin Schwenke <martins@samba.org>2014-09-17 07:29:10 +0200
commitd1ea95e3c30d4217964c66e135db6e49bac753d5 (patch)
treef6f39410e9fd28e06f1a2a70e7a277b7afa7a0a5 /ctdb/wscript
parente4b9beb2d8872d2f46316ac8499d73fe5e8c521f (diff)
downloadsamba-d1ea95e3c30d4217964c66e135db6e49bac753d5.tar.gz
ctdb-build: Check for libpcap
AIX and FreeBSD do not support raw sockets. So use libpcap interface to watch for specific TCP messages. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/wscript')
-rwxr-xr-xctdb/wscript12
1 files changed, 11 insertions, 1 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index fd7650a5cf0..96782af56f1 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -93,6 +93,16 @@ def configure(conf):
if not conf.CHECK_VARIABLE('ETIME', headers='errno.h'):
conf.DEFINE('ETIME', 'ETIMEDOUT')
+ if sys.platform.startswith('linux'):
+ conf.SET_TARGET_TYPE('pcap', 'EMPTY')
+ else:
+ if not conf.CHECK_HEADERS('pcap.h'):
+ Logs.error('Need libpcap')
+ sys.exit(1)
+ if not conf.CHECK_FUNCS_IN('pcap_open_live', 'pcap', headers='pcap.h'):
+ Logs.error('Need libpcap')
+ sys.exit(1)
+
have_pmda = False
if Options.options.ctdb_pmda:
pmda_support = True
@@ -246,7 +256,7 @@ def build(bld):
bld.SAMBA_SUBSYSTEM('ctdb-system',
source=CTDB_SYSTEM_SRC,
includes='include include/internal',
- deps='replace talloc tevent tdb')
+ deps='replace talloc tevent tdb pcap')
bld.SAMBA_SUBSYSTEM('ctdb-client',
source=bld.SUBDIR('client', 'ctdb_client.c'),