From: Michal Privoznik Date: Thu, 23 Mar 2023 08:15:35 +0000 (+0100) Subject: meson: Use dependency().found() instead of conf.has() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=063e8b9d621b2bce5560626c70e736d685f77b02;p=libvirt.git meson: Use dependency().found() instead of conf.has() So far this change alone doesn't make much sense, but prepares code for upcoming change. Unfortunately, some conf.has() statements have to stay, because there's no corresponding dependency(). But that's okay. Signed-off-by: Michal Privoznik Reviewed-by: Erik Skultety --- diff --git a/meson.build b/meson.build index 53d369557d..aa391e7178 100644 --- a/meson.build +++ b/meson.build @@ -1175,6 +1175,8 @@ if not get_option('sanlock').disabled() conf.set('WITH_SANLOCK_STRERROR', 1) endif endif +else + sanlock_dep = dependency('', required: false) endif sasl_version = '2.1.26' @@ -2209,7 +2211,7 @@ libs_summary = { 'libssh': libssh_dep.found(), 'libssh2': libssh2_dep.found(), 'libutil': libutil_dep.found(), - 'netcf': conf.has('WITH_NETCF'), + 'netcf': netcf_dep.found(), 'NLS': have_gnu_gettext_tools, 'numactl': numactl_dep.found(), 'openwsman': openwsman_dep.found(), @@ -2218,7 +2220,7 @@ libs_summary = { 'polkit': conf.has('WITH_POLKIT'), 'rbd': rbd_dep.found(), 'readline': readline_dep.found(), - 'sanlock': conf.has('WITH_SANLOCK'), + 'sanlock': sanlock_dep.found(), 'sasl': sasl_dep.found(), 'selinux': selinux_dep.found(), 'udev': udev_dep.found(),