]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: Use dependency().found() instead of conf.has()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 23 Mar 2023 08:15:35 +0000 (09:15 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 12 Jun 2023 10:21:02 +0000 (12:21 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
meson.build

index 53d369557de2767616ee89dbae427529de1bc060..aa391e717874974c1c166ee2d92e1732e8b00d44 100644 (file)
@@ -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(),