]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: add audit build dependency
authorPavel Hrdina <phrdina@redhat.com>
Wed, 29 Jul 2020 12:20:29 +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-audit.m4 [deleted file]
meson.build
meson_options.txt

index 523a840f4c3233a4c5c5a998b8d32357ec2fd8c6..03cd304f1bffeb3d62c009627b4fb9e763a62637 100644 (file)
@@ -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
@@ -473,7 +471,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 (file)
index f2e855e..0000000
+++ /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])
-])
index 78f78fa8e585a0a07f6c4100acd808fccdf077c2..68138ac4bcbb3d7eef0251f9ded92e5d7315558f 100644 (file)
@@ -976,6 +976,11 @@ if attr_dep.found()
   conf.set('HAVE_LIBATTR', 1)
 endif
 
+audit_dep = cc.find_library('audit', required: get_option('audit'))
+if audit_dep.found()
+  conf.set('WITH_AUDIT', 1)
+endif
+
 
 # define top include directory
 
@@ -999,6 +1004,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)
 
index 8e511493836f0d6ba1460b5ef8ec2e074025538e..c8adfd3cc729591fba4b5717affd78f852c6c901 100644 (file)
@@ -12,6 +12,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')
+option('audit', type: 'feature', value: 'auto', description: 'audit support')
 
 
 # build driver options