[libvirt PATCH 036/351] meson: add audit build dependency

Pavel Hrdina phrdina at redhat.com
Thu Jul 16 09:54:32 UTC 2020


Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 configure.ac      |  3 ---
 m4/virt-audit.m4  | 31 -------------------------------
 meson.build       |  6 ++++++
 meson_options.txt |  1 +
 4 files changed, 7 insertions(+), 34 deletions(-)
 delete mode 100644 m4/virt-audit.m4

diff --git a/configure.ac b/configure.ac
index 6d5fcb4281d..2c9f38f9ba6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,7 +114,6 @@ fi
 
 # Check for compiler and library settings.
 
-LIBVIRT_ARG_AUDIT
 LIBVIRT_ARG_BASH_COMPLETION
 LIBVIRT_ARG_BLKID
 LIBVIRT_ARG_CAPNG
@@ -148,7 +147,6 @@ LIBVIRT_ARG_VIRTUALPORT
 LIBVIRT_ARG_WIRESHARK
 LIBVIRT_ARG_YAJL
 
-LIBVIRT_CHECK_AUDIT
 LIBVIRT_CHECK_BASH_COMPLETION
 LIBVIRT_CHECK_BLKID
 LIBVIRT_CHECK_CAPNG
@@ -475,7 +473,6 @@ LIBVIRT_RESULT_DRIVER_MODULES
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Libraries])
 AC_MSG_NOTICE([])
-LIBVIRT_RESULT_AUDIT
 LIBVIRT_RESULT_BASH_COMPLETION
 LIBVIRT_RESULT_BLKID
 LIBVIRT_RESULT_CAPNG
diff --git a/m4/virt-audit.m4 b/m4/virt-audit.m4
deleted file mode 100644
index f2e855e88f0..00000000000
--- a/m4/virt-audit.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl The libaudit.so library
-dnl
-dnl Copyright (C) 2012-2013 Red Hat, Inc.
-dnl
-dnl This library is free software; you can redistribute it and/or
-dnl modify it under the terms of the GNU Lesser General Public
-dnl License as published by the Free Software Foundation; either
-dnl version 2.1 of the License, or (at your option) any later version.
-dnl
-dnl This library is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-dnl Lesser General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU Lesser General Public
-dnl License along with this library.  If not, see
-dnl <http://www.gnu.org/licenses/>.
-dnl
-
-AC_DEFUN([LIBVIRT_ARG_AUDIT],[
-  LIBVIRT_ARG_WITH_FEATURE([AUDIT], [audit], [check])
-])
-
-AC_DEFUN([LIBVIRT_CHECK_AUDIT],[
-  LIBVIRT_CHECK_LIB([AUDIT], [audit],
-                    [audit_encode_nv_string], [libaudit.h])
-])
-
-AC_DEFUN([LIBVIRT_RESULT_AUDIT],[
-  LIBVIRT_RESULT_LIB([AUDIT])
-])
diff --git a/meson.build b/meson.build
index 3d7bd8c4149..7aacfc2011c 100644
--- a/meson.build
+++ b/meson.build
@@ -960,6 +960,11 @@ endif
 
 attr_dep = cc.find_library('attr', required: get_option('attr'))
 
+audit_dep = cc.find_library('audit', required: get_option('audit'))
+if audit_dep.found()
+  conf.set('WITH_AUDIT', 1)
+endif
+
 
 # define top include directory
 
@@ -983,6 +988,7 @@ libs_summary = {
   'acl': acl_dep.found(),
   'apparmor': apparmor_dep.found(),
   'attr': attr_dep.found(),
+  'audit': audit_dep.found(),
 }
 summary(libs_summary, section: 'Libraries', bool_yn: true)
 
diff --git a/meson_options.txt b/meson_options.txt
index be7ad8b96f9..16822374180 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,3 +11,4 @@ option('test_coverage', type: 'boolean', value: false, description: 'turn on cod
 # build dependencies options
 option('apparmor', type: 'feature', value: 'auto', description: 'apparmor support')
 option('attr', type: 'feature', value: 'auto', description: 'attr support')
+option('audit', type: 'feature', value: 'auto', description: 'audit support')
-- 
2.26.2




More information about the libvir-list mailing list