From 1e952c20da24a63ba3c16ab3681ce2ad28f2eb07 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Wed, 29 Jul 2020 14:20:29 +0200 Subject: [PATCH] meson: add audit build dependency Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- 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 523a840f4c..03cd304f1b 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 @@ -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 index f2e855e88f..0000000000 --- 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 . -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 78f78fa8e5..68138ac4bc 100644 --- a/meson.build +++ b/meson.build @@ -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) diff --git a/meson_options.txt b/meson_options.txt index 8e51149383..c8adfd3cc7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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