Detect liburing once and set RTE_HAS_LIBURING, as done for libpcap, so
drivers and libraries can share the check. Require version 2.4, which
provides the io_uring setup flags and helpers af_packet needs.

Suggested-by: Stephen Hemminger <[email protected]>
Signed-off-by: Scott Mitchell <[email protected]>
---
 config/meson.build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/config/meson.build b/config/meson.build
index bfac1cd93d..6b60971bc3 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -301,6 +301,12 @@ if (pcap_dep.found() and cc.has_header('pcap.h', 
dependencies: pcap_dep)
     dpdk_extra_ldflags += '-l@0@'.format(pcap_lib)
 endif
 
+# check for liburing
+iouring_dep = dependency('liburing', version: '>= 2.4', required: false, 
method: 'pkg-config')
+if iouring_dep.found()
+    dpdk_conf.set('RTE_HAS_LIBURING', 1)
+endif
+
 # for clang 32-bit compiles we need libatomic for 64-bit atomic ops
 if cc.get_id() == 'clang' and dpdk_conf.get('RTE_ARCH_64') == false
     atomic_dep = cc.find_library('atomic', required: true)
-- 
2.54.0 (Apple Git-157)

Reply via email to