From 063e8b9d621b2bce5560626c70e736d685f77b02 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Thu, 23 Mar 2023 09:15:35 +0100 Subject: [PATCH] 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 --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(),