summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2019-09-14 11:36:59 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-10-08 12:14:31 +0200
commita29052bfeb6037dd9175c9f2cf29345be2bc2f65 (patch)
treede98e836b818dc627f0eef8c2760f174f39d05e0 /drivers/net
parente5720de44f85f343c3b66f1f411683a629957c59 (diff)
downloaddpdk-a29052bfeb6037dd9175c9f2cf29345be2bc2f65.zip
dpdk-a29052bfeb6037dd9175c9f2cf29345be2bc2f65.tar.gz
dpdk-a29052bfeb6037dd9175c9f2cf29345be2bc2f65.tar.xz
net/nfb: fix dependency check
The library libnfb is part of netcope-common which provides a pkg-config file: netcope-common.pc. Looking for this .pc file - with dependency() - is preferred than looking for the library - with cc.find_library(). If the library is not installed in a standard path, it can be found thanks to PKG_CONFIG_PATH variable. The previous solution required to use CFLAGS and LDFLAGS environment variables. Fixes: 6435f9a0ac22 ("net/nfb: add new netcope driver") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Jan Remes <remes@netcope.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/nfb/meson.build9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build
index 4502c3f..d53e8ec 100644
--- a/drivers/net/nfb/meson.build
+++ b/drivers/net/nfb/meson.build
@@ -3,14 +3,9 @@
# Copyright(c) 2019 Netcope Technologies, a.s. <info@netcope.com>
# All rights reserved.
-dep = cc.find_library('nfb', required: false)
+dep = dependency('netcope-common', required: false)
reason = 'missing dependency, "libnfb"'
-
-build = dep.found() and cc.has_header('nfb/nfb.h', dependencies: dep)
-
-nc = dependency('netcope-common', required: false)
-
+build = dep.found()
ext_deps += dep
-ext_deps += nc
sources = files('nfb_rx.c', 'nfb_tx.c', 'nfb_stats.c', 'nfb_ethdev.c', 'nfb_rxmode.c')