From: Andrea Bolognani Date: Wed, 26 May 2021 15:47:58 +0000 (+0200) Subject: meson: Style tweaks X-Git-Tag: v7.5.0-rc1~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1774e4e0fb30fdd28a984edf77d62b3fb5e59d7;p=thirdparty%2Flibvirt.git meson: Style tweaks These checks look different than most similar ones for no particular reason. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- diff --git a/meson.build b/meson.build index 36bb355414..2fa379f47a 100644 --- a/meson.build +++ b/meson.build @@ -991,12 +991,12 @@ endif libpcap_version = '1.5.0' if not get_option('libpcap').disabled() libpcap_dep = dependency('pcap', version: '>=' + libpcap_version, required: get_option('libpcap')) + if libpcap_dep.found() + conf.set('WITH_LIBPCAP', 1) + endif else libpcap_dep = dependency('', required: false) endif -if libpcap_dep.found() - conf.set('WITH_LIBPCAP', 1) -endif libssh_version = '0.7' if get_option('driver_remote').enabled() @@ -1139,19 +1139,19 @@ if not get_option('readline').disabled() endif endif endif + if readline_dep.found() + # We need this to avoid compilation issues with modern compilers. + # See 9ea3424a178 for a more detailed explanation + readline_dep = declare_dependency( + compile_args: [ '-D_FUNCTION_DEF' ], + dependencies: [ readline_dep ], + ) + + conf.set('WITH_READLINE', 1) + endif else readline_dep = dependency('', required: false) endif -if readline_dep.found() - # We need this to avoid compilation issues with modern compilers. - # See 9ea3424a178 for a more detailed explanation - readline_dep = declare_dependency( - compile_args: [ '-D_FUNCTION_DEF' ], - dependencies: [ readline_dep ], - ) - - conf.set('WITH_READLINE', 1) -endif if not get_option('sanlock').disabled() sanlock_dep = dependency('libsanlock_client', required: get_option('sanlock')) @@ -1882,10 +1882,9 @@ if conf.has('WITH_LIBVIRTD') if not get_option('storage_vstorage').disabled() vstorage_enable = true if host_machine.system() != 'linux' + vstorage_enable = false if get_option('storage_vstorage').enabled() error('Vstorage is supported only on Linux') - else - vstorage_enable = false endif endif