summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2019-02-26 17:46:35 +0000
committerThomas Monjalon <thomas@monjalon.net>2019-02-27 12:28:03 +0100
commita9933bb1debf55509f1ec265d86192d62473b1a9 (patch)
treea05219687e3f7b26fd768cace5b9b534b171e916 /config
parent8990c8c0d0bce23eb46fb139e5ad668cb199c6cf (diff)
downloaddpdk-draft-windows-a9933bb1debf55509f1ec265d86192d62473b1a9.zip
dpdk-draft-windows-a9933bb1debf55509f1ec265d86192d62473b1a9.tar.gz
dpdk-draft-windows-a9933bb1debf55509f1ec265d86192d62473b1a9.tar.xz
build: improve libbsd dependency handling
Use dependency() instead of manual append to ldflags. Move libbsd inclusion to librte_eal, so that all other libraries and PMDs will inherit it. Signed-off-by: Luca Boccassi <bluca@debian.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'config')
-rw-r--r--config/meson.build10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/meson.build b/config/meson.build
index b91778e..0419607 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -76,11 +76,11 @@ if numa_dep.found() and cc.has_header('numaif.h')
endif
# check for strlcpy
-if host_machine.system() == 'linux' and cc.find_library('bsd',
- required: false).found() and cc.has_header('bsd/string.h')
- dpdk_conf.set('RTE_USE_LIBBSD', 1)
- add_project_link_arguments('-lbsd', language: 'c')
- dpdk_extra_ldflags += '-lbsd'
+if host_machine.system() == 'linux'
+ libbsd = dependency('libbsd', required: false)
+ if libbsd.found()
+ dpdk_conf.set('RTE_USE_LIBBSD', 1)
+ endif
endif
# add -include rte_config to cflags