meson: Style tweaks

These checks look different than most similar ones for no
particular reason.

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 17:47:58 +02:00
parent 2a38cc59e3
commit b1774e4e0f

View File

@ -991,12 +991,12 @@ endif
libpcap_version = '1.5.0' libpcap_version = '1.5.0'
if not get_option('libpcap').disabled() if not get_option('libpcap').disabled()
libpcap_dep = dependency('pcap', version: '>=' + libpcap_version, required: get_option('libpcap')) libpcap_dep = dependency('pcap', version: '>=' + libpcap_version, required: get_option('libpcap'))
if libpcap_dep.found()
conf.set('WITH_LIBPCAP', 1)
endif
else else
libpcap_dep = dependency('', required: false) libpcap_dep = dependency('', required: false)
endif endif
if libpcap_dep.found()
conf.set('WITH_LIBPCAP', 1)
endif
libssh_version = '0.7' libssh_version = '0.7'
if get_option('driver_remote').enabled() if get_option('driver_remote').enabled()
@ -1139,10 +1139,7 @@ if not get_option('readline').disabled()
endif endif
endif endif
endif endif
else if readline_dep.found()
readline_dep = dependency('', required: false)
endif
if readline_dep.found()
# We need this to avoid compilation issues with modern compilers. # We need this to avoid compilation issues with modern compilers.
# See 9ea3424a178 for a more detailed explanation # See 9ea3424a178 for a more detailed explanation
readline_dep = declare_dependency( readline_dep = declare_dependency(
@ -1151,6 +1148,9 @@ if readline_dep.found()
) )
conf.set('WITH_READLINE', 1) conf.set('WITH_READLINE', 1)
endif
else
readline_dep = dependency('', required: false)
endif endif
if not get_option('sanlock').disabled() if not get_option('sanlock').disabled()
@ -1882,10 +1882,9 @@ if conf.has('WITH_LIBVIRTD')
if not get_option('storage_vstorage').disabled() if not get_option('storage_vstorage').disabled()
vstorage_enable = true vstorage_enable = true
if host_machine.system() != 'linux' if host_machine.system() != 'linux'
vstorage_enable = false
if get_option('storage_vstorage').enabled() if get_option('storage_vstorage').enabled()
error('Vstorage is supported only on Linux') error('Vstorage is supported only on Linux')
else
vstorage_enable = false
endif endif
endif endif