From 83ff55b5a2618d32f623d7ca0b6f9c28b7253972 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Wed, 26 May 2021 16:06:40 +0200 Subject: [PATCH] meson: Switch to autodetection for driver_remote Match the behavior of most other features. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- meson.build | 14 +++++++++++--- meson_options.txt | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index e632dfbd77..ce0772f7a8 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')