From: Martin Schwenke Date: Fri, 23 Jul 2021 04:39:05 +0000 (+1000) Subject: ctdb-build: Use pcap-config when available X-Git-Tag: samba-4.17.11~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f25b506a73dea3a02c02e62b6979e108760dee00;p=thirdparty%2Fsamba.git ctdb-build: Use pcap-config when available The build currently fails on AIX, which can't find the pcap headers because they're installed in a non-standard place. However, there is a pcap-config script available. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit a83e9ca696a37b00231ce40cca5a043beb9b5590) --- diff --git a/ctdb/wscript b/ctdb/wscript index c082c3b7a7d..8f6e2bb5203 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -204,6 +204,12 @@ def configure(conf): if sys.platform.startswith('linux'): conf.SET_TARGET_TYPE('pcap', 'EMPTY') else: + conf.find_program('pcap-config', var='PCAP_CONFIG') + if conf.env.PCAP_CONFIG: + conf.CHECK_CFG(path=conf.env.PCAP_CONFIG, + args="--cflags --libs", + package="", + uselib_store="PCAP") if not conf.CHECK_HEADERS('pcap.h'): Logs.error('Need libpcap') sys.exit(1)