meson: Switch to autodetection for driver_remote

Match the behavior of most other features.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Andrea Bolognani 2021-05-26 16:06:40 +02:00
parent 2676fa8ccb
commit 83ff55b5a2
2 changed files with 12 additions and 4 deletions

View File

@ -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()

View File

@ -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')