6930c0403a
Rather than trying to use meson's build-in detection for libpcap, and having to special-case cross-building, just check for the presence of pcap.h and the pcap library. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Hemant Agrawal <hemant.agrawal@nxp.com>
13 lines
331 B
Meson
13 lines
331 B
Meson
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright(c) 2017 Intel Corporation
|
|
|
|
pcap_dep = cc.find_library('pcap', required: false)
|
|
if pcap_dep.found() and cc.has_header('pcap.h', dependencies: pcap_dep)
|
|
build = true
|
|
else
|
|
build = false
|
|
endif
|
|
sources = files('rte_eth_pcap.c')
|
|
ext_deps += pcap_dep
|
|
pkgconfig_extra_libs += '-lpcap'
|