The mount command uses HAVE_SECURITY_GET_INITIAL_CONTEXT to enable
SELinux context warnings. This check was missing in meson, leaving
that code path dead in meson builds.
Autotools checks for this function in configure.ac since it may be
missing in old libselinux 1.xx versions.
Signed-off-by: Karel Zak <kzak@redhat.com>
version : '>= 2.5',
required : get_option('selinux'))
conf.set('HAVE_LIBSELINUX', lib_selinux.found() ? 1 : false)
+if lib_selinux.found()
+ have = cc.has_function('security_get_initial_context',
+ dependencies : lib_selinux)
+ conf.set('HAVE_SECURITY_GET_INITIAL_CONTEXT', have ? 1 : false)
+endif
lib_magic = dependency(
'libmagic',