1# SPDX-License-Identifier: BSD-3-Clause 2# Copyright(c) 2017 Intel Corporation 3 4pcap_dep = dependency('pcap', required: false) 5if pcap_dep.found() 6 build = true 7else 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) 13 build = true 14 pkgconfig_extra_libs += '-lpcap' 15 else 16 build = false 17 endif 18endif 19sources = files('rte_eth_pcap.c') 20ext_deps += pcap_dep 21