dpdk_extra_ldflags += '-lnuma'
endif
+has_libfdt = 0
+fdt_dep = cc.find_library('libfdt', required: false)
+if fdt_dep.found() and cc.has_header('fdt.h')
+ dpdk_conf.set10('RTE_HAS_LIBFDT', true)
+ has_libfdt = 1
+ add_project_link_arguments('-lfdt', language: 'c')
+ dpdk_extra_ldflags += '-lfdt'
+endif
+
# check for libbsd
libbsd = dependency('libbsd', required: false)
if libbsd.found()
# rte_eth_switch_domain_free()
#
-dep = dependency('libfdt', required: false)
-if not dep.found()
- dep = cc.find_library('libfdt', required: false)
-endif
-if not dep.found()
+if has_libfdt == 0
build = false
reason = 'missing dependency, "libfdt"'
subdir_done()
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation
-dep = dependency('libfdt', required: false)
-if not dep.found()
- dep = cc.find_library('libfdt', required: false)
-endif
-if not dep.found()
+if has_libfdt == 0
build = false
reason = 'missing dependency, "libfdt"'
subdir_done()
deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs',
'bus_vdev', 'bus_ifpga', 'net', 'pmd_i40e', 'pmd_ipn3ke']
-ext_deps += dep
sources = files('ifpga_rawdev.c')