From: Andrea Bolognani Date: Thu, 29 Jun 2023 09:25:12 +0000 (+0200) Subject: meson: Detect AppArmor 3.x X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4a779f21bd11a2d2abf26e506037328c3a18e6f4;p=libvirt.git meson: Detect AppArmor 3.x We will soon need to base some decisions on whether AppArmor 3.x or 2.x is present on the system. Signed-off-by: Andrea Bolognani Reviewed-by: Jim Fehlig --- diff --git a/meson.build b/meson.build index 6b075282b6..958c1a26a0 100644 --- a/meson.build +++ b/meson.build @@ -879,6 +879,9 @@ endif apparmor_dep = dependency('libapparmor', required: get_option('apparmor')) if apparmor_dep.found() conf.set('WITH_APPARMOR', 1) + if apparmor_dep.version().version_compare('>=3.0.0') + conf.set('WITH_APPARMOR_3', 1) + endif conf.set_quoted('APPARMOR_DIR', sysconfdir / 'apparmor.d') conf.set_quoted('APPARMOR_PROFILES_PATH', '/sys/kernel/security/apparmor/profiles') endif