[glib: 1/2] meson: Turn selinux into a meson feature and make it auto by default



commit 8cc92bcca6290a696128ae87acb40beecec22f6b
Author: Thibault Saunier <tsaunier igalia com>
Date:   Tue Nov 20 08:55:26 2018 -0300

    meson: Turn selinux into a meson feature and make it auto by default
    
    Making it more user friendly when building on distro no deploying selinux

 meson.build       | 7 ++++---
 meson_options.txt | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/meson.build b/meson.build
index ce71ca053..02d7a11c2 100644
--- a/meson.build
+++ b/meson.build
@@ -1812,9 +1812,10 @@ if host_system == 'windows'
 endif
 
 selinux_dep = []
-if host_system == 'linux' and get_option('selinux')
-  selinux_dep = [dependency('libselinux')]
-  glib_conf.set('HAVE_SELINUX', 1)
+if host_system == 'linux'
+  selinux_dep = dependency('libselinux', required: get_option('selinux'))
+
+  glib_conf.set('HAVE_SELINUX', selinux_dep.found())
 endif
 
 xattr_dep = []
diff --git a/meson_options.txt b/meson_options.txt
index 64accf68b..f25eae9c6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -20,8 +20,8 @@ option('gio_module_dir',
        description : 'load gio modules from this directory (default to \'libdir/gio/modules\' if unset)')
 
 option('selinux',
-       type : 'boolean',
-       value : true,
+       type : 'feature',
+       value : 'auto',
        description : 'build with selinux support')
 
 option('xattr',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]