From 3ace72965c3b11fc763f781ae7ce3ca29dd36507 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Wed, 29 Jul 2020 14:20:15 +0200 Subject: [PATCH] meson: add attr build option Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- configure.ac | 3 --- m4/virt-attr.m4 | 13 ------------- meson.build | 6 ++++++ meson_options.txt | 1 + 4 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 m4/virt-attr.m4 diff --git a/configure.ac b/configure.ac index 6635d1db3f..523a840f4c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 478549c17f..0000000000 --- a/m4/virt-attr.m4 +++ /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]) -]) diff --git a/meson.build b/meson.build index b3183127ee..78f78fa8e5 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/meson_options.txt b/meson_options.txt index 99dd956432..8e51149383 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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