diff options
author | Eric Anholt <eric@anholt.net> | 2018-08-09 13:02:41 -0700 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-08-28 16:29:00 -0400 |
commit | 8a3ae555efb02b3811cca0bfb4ddaf8fe1457778 (patch) | |
tree | 447e4f0ff60133c3a2c304024145ba4b83397dd5 /meson.build | |
parent | a90f33721eba7f2dbde4a7278f1a213d696c85e9 (diff) |
meson: Add an option to build XSELINUX.
Dependencies are ported from the automake build.
v2: Make it a tristate defaulting to 'auto'. Use pkg-config for libaudit.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/meson.build b/meson.build index e7ce68a50..53cdbe2be 100644 --- a/meson.build +++ b/meson.build @@ -442,9 +442,6 @@ elif get_option('mitshm') == 'true' build_mitshm = true endif -# XXX: Allow configuration of these. -build_xselinux = false - m_dep = cc.find_library('m', required : false) dl_dep = cc.find_library('dl', required : false) @@ -506,6 +503,23 @@ inc = include_directories( 'xfixes', ) +build_xselinux = false +if get_option('xselinux') != 'false' + dep_selinux = dependency('libselinux', version: '>= 2.0.86', + required: get_option('xselinux') == 'true') + dep_audit = dependency('audit', required: get_option('xselinux') == 'true') + if get_option('xselinux') == 'true' + build_xselinux = true + else + build_xselinux = dep_selinux.found() and dep_audit.found() + endif + + if build_xselinux + common_dep += dep_selinux + common_dep += dep_audit + endif +endif + glx_inc = include_directories('glx') top_srcdir_inc = include_directories('.') |