On 2/14/2022 11:25 AM, spin...@cesnet.cz wrote:
From: Martin Spinler <spin...@cesnet.cz>

The driver uses some FDT manipulation functions from libfdt.
Let the build system check for libfdt package.


I don't see 'libfdt.h' included by the driver, where/how libfdt
is used?

Also what do you think to document this external dependency
and its usage in the driver documentation?

Signed-off-by: Martin Spinler <spin...@cesnet.cz>
---
  drivers/net/nfb/meson.build | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/drivers/net/nfb/meson.build b/drivers/net/nfb/meson.build
index bb5f66a09a..c080c06bf9 100644
--- a/drivers/net/nfb/meson.build
+++ b/drivers/net/nfb/meson.build
@@ -9,6 +9,12 @@ if is_windows
      subdir_done()
  endif
+if has_libfdt == 0
+    build = false
+    reason = 'missing dependency, "libfdt"'
+    subdir_done()
+endif
+
  dep = dependency('netcope-common', required: false, method: 'pkg-config')
  reason = 'missing dependency, "libnfb"'
  build = dep.found()

Reply via email to