Commit 8a3ae555 authored by Eric Anholt's avatar Eric Anholt Committed by Adam Jackson

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's avatarEric Anholt <eric@anholt.net>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent a90f3372
Pipeline #3653 passed with stage
in 3 minutes and 1 second
......@@ -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('.')
......
......@@ -80,6 +80,8 @@ option('xres', type: 'boolean', value: true,
description: 'XRes extension')
option('xace', type: 'boolean', value: true,
description: 'X-ACE extension')
option('xselinux', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto',
description: 'XSELINUX extension')
option('xinerama', type: 'boolean', value: true,
description: 'Xinerama extension')
option('xcsecurity', type: 'boolean', value: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment