1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

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 <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2021-07-23 14:39:05 +10:00 committed by Amitay Isaacs
parent 3b6255b5b9
commit a83e9ca696

View File

@ -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)