1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017 Intel Corporation
4 pcap_dep = dependency('pcap', required: false)
8 # pcap got a pkg-config file only in 1.9.0 and before that meson uses
9 # an internal pcap-config finder, which is not compatible with
10 # cross-compilation, so try to fallback to find_library
11 pcap_dep = cc.find_library('pcap', required: false)
12 if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
14 pkgconfig_extra_libs += '-lpcap'
17 reason = 'missing dependency, "libpcap"'
20 sources = files('rte_eth_pcap.c')