]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Convert attr_dep to dependency()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 4 Mar 2025 08:23:51 +0000 (09:23 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 23 Jul 2025 14:02:41 +0000 (16:02 +0200)
Currently, libattr is detected using cc.find_library() because at
historically, the library was lacking pkg-config file. But that
changed with libattr-2.4.48 (released 7+ years ago) and even
prehistoric distros have it now. Switch to dependency().

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build

index 08521fe7ea266efb70a0b5ded91421b964af8f86..7fd0e835e9c616e43182da9f3c04fabd95abd260 100644 (file)
@@ -919,8 +919,7 @@ if not get_option('apparmor_profiles').disabled()
   endif
 endif
 
-# FIXME rewrite to use dependency() once we can use 2.4.48
-attr_dep = cc.find_library('attr', required: get_option('attr'))
+attr_dep = dependency('libattr', required: get_option('attr'))
 if attr_dep.found()
   conf.set('WITH_LIBATTR', 1)
 endif