]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add attr build option
authorPavel Hrdina <phrdina@redhat.com>
Wed, 29 Jul 2020 12:20:15 +0000 (14:20 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:26:59 +0000 (09:26 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
configure.ac
m4/virt-attr.m4 [deleted file]
meson.build
meson_options.txt

index 6635d1db3fb832495ed756f31589577b0b70376d..523a840f4c3233a4c5c5a998b8d32357ec2fd8c6 100644 (file)
@@ -114,7 +114,6 @@ fi
 
 # Check for compiler and library settings.
 
-LIBVIRT_ARG_ATTR
 LIBVIRT_ARG_AUDIT
 LIBVIRT_ARG_BASH_COMPLETION
 LIBVIRT_ARG_BLKID
@@ -149,7 +148,6 @@ LIBVIRT_ARG_VIRTUALPORT
 LIBVIRT_ARG_WIRESHARK
 LIBVIRT_ARG_YAJL
 
-LIBVIRT_CHECK_ATTR
 LIBVIRT_CHECK_AUDIT
 LIBVIRT_CHECK_BASH_COMPLETION
 LIBVIRT_CHECK_BLKID
@@ -475,7 +473,6 @@ LIBVIRT_RESULT_DRIVER_MODULES
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Libraries])
 AC_MSG_NOTICE([])
-LIBVIRT_RESULT_ATTR
 LIBVIRT_RESULT_AUDIT
 LIBVIRT_RESULT_BASH_COMPLETION
 LIBVIRT_RESULT_BLKID
diff --git a/m4/virt-attr.m4 b/m4/virt-attr.m4
deleted file mode 100644 (file)
index 478549c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-dnl The libattr.so library
-
-AC_DEFUN([LIBVIRT_ARG_ATTR],[
-  LIBVIRT_ARG_WITH_FEATURE([ATTR], [attr], [check])
-])
-
-AC_DEFUN([LIBVIRT_CHECK_ATTR],[
-  LIBVIRT_CHECK_LIB([ATTR], [attr], [getxattr], [sys/xattr.h])
-])
-
-AC_DEFUN([LIBVIRT_RESULT_ATTR],[
-  LIBVIRT_RESULT_LIB([ATTR])
-])
index b3183127ee2ea14506b55dcc1140f9257d3978cd..78f78fa8e585a0a07f6c4100acd808fccdf077c2 100644 (file)
@@ -971,6 +971,11 @@ if apparmor_dep.found()
   conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles')
 endif
 
+attr_dep = cc.find_library('attr', required: get_option('attr'))
+if attr_dep.found()
+  conf.set('HAVE_LIBATTR', 1)
+endif
+
 
 # define top include directory
 
@@ -993,6 +998,7 @@ configure_file(output: 'meson-config.h', configuration: conf)
 libs_summary = {
   'acl': acl_dep.found(),
   'apparmor': apparmor_dep.found(),
+  'attr': attr_dep.found(),
 }
 summary(libs_summary, section: 'Libraries', bool_yn: true)
 
index 99dd956432740329aa39346944bc4d42f50b1624..8e511493836f0d6ba1460b5ef8ec2e074025538e 100644 (file)
@@ -11,6 +11,7 @@ option('git_werror', type: 'feature', value: 'auto', description: 'use -Werror i
 
 # build dependencies options
 option('apparmor', type: 'feature', value: 'auto', description: 'apparmor support')
+option('attr', type: 'feature', value: 'auto', description: 'attr support')
 
 
 # build driver options