xref: /f-stack/dpdk/drivers/net/af_xdp/meson.build (revision 2d9fd380)
1# SPDX-License-Identifier: BSD-3-Clause
2# Copyright(c) 2019 Intel Corporation
3
4sources = files('rte_eth_af_xdp.c')
5
6bpf_dep = dependency('libbpf', required: false)
7if not bpf_dep.found()
8	bpf_dep = cc.find_library('bpf', required: false)
9endif
10
11if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h')
12	ext_deps += bpf_dep
13	bpf_ver_dep = dependency('libbpf', version : '>=0.2.0', required: false)
14	if bpf_ver_dep.found()
15		dpdk_conf.set('RTE_LIBRTE_AF_XDP_PMD_SHARED_UMEM', 1)
16	endif
17else
18	build = false
19	reason = 'missing dependency, "libbpf"'
20endif
21