[libvirt PATCH 22/26] meson: Switch to autodetection for driver_remote

Andrea Bolognani abologna at redhat.com
Tue Jun 1 08:37:53 UTC 2021


Match the behavior of most other features.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 meson.build       | 14 +++++++++++---
 meson_options.txt |  2 +-
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index be6765a034..53c9a038d0 100644
--- a/meson.build
+++ b/meson.build
@@ -1400,11 +1400,19 @@ endif
 
 # build driver options
 
-if get_option('driver_remote').enabled()
+if not get_option('driver_remote').disabled()
+  use_remote = true
+
   if not xdr_dep.found()
-    error('XDR is required for remote driver')
+    use_remote = false
+    if get_option('driver_remote').enabled()
+      error('XDR is required for remote driver')
+    endif
+  endif
+
+  if use_remote
+    conf.set('WITH_REMOTE', 1)
   endif
-  conf.set('WITH_REMOTE', 1)
 endif
 
 remote_default_mode = get_option('remote_default_mode').to_upper()
diff --git a/meson_options.txt b/meson_options.txt
index df921c9243..fd23469431 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -59,7 +59,7 @@ option('driver_qemu', type: 'feature', value: 'auto', description: 'QEMU/KVM dri
 option('qemu_user', type: 'string', value: '', description: 'username to run QEMU system instance as')
 option('qemu_group', type: 'string', value: '', description: 'groupname to run QEMU system instance as')
 option('qemu_moddir', type: 'string', value: '', description: 'set the directory where QEMU modules are located')
-option('driver_remote', type: 'feature', value: 'enabled', description: 'remote driver')
+option('driver_remote', type: 'feature', value: 'auto', description: 'remote driver')
 option('remote_default_mode', type: 'combo', choices: ['legacy', 'direct'], value: 'legacy', description: 'remote driver default mode')
 option('driver_secrets', type: 'feature', value: 'auto', description: 'local secrets management driver')
 option('driver_test', type: 'feature', value: 'enabled', description: 'test driver')
-- 
2.31.1




More information about the libvir-list mailing list