]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Require XDR for wireshark
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Dec 2021 12:12:17 +0000 (13:12 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 15 Dec 2021 11:12:44 +0000 (12:12 +0100)
The way our wireshark dissector works is by providing decoders
for primitive types (like integers, string, double, etc.) and
then parsing virsomethingprotocol.x files and generating complex
decoders for RPC. This obviously means that XDR is required for
the dissector, but corresponding check was missing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
meson.build

index cea8bbfa0cc389d2995454575814a4422672aa55..c5f0ee728755b335d5bd551f3a1f8ec6645067e1 100644 (file)
@@ -1310,6 +1310,16 @@ endif
 
 wireshark_version = '2.6.0'
 wireshark_dep = dependency('wireshark', version: '>=' + wireshark_version, required: get_option('wireshark_dissector'))
+if wireshark_dep.found()
+  if not xdr_dep.found()
+    if get_option('wireshark_dissector').enabled()
+      error('XDR is required for wireshark plugin')
+    else
+      wireshark_dep = dependency('', required: false)
+    endif
+  endif
+endif
+
 if wireshark_dep.found()
   wireshark_plugindir = get_option('wireshark_plugindir')
   if wireshark_plugindir == ''