summaryrefslogtreecommitdiffstats
path: root/src/external/selinux.m4
diff options
context:
space:
mode:
Diffstat (limited to 'src/external/selinux.m4')
-rw-r--r--src/external/selinux.m413
1 files changed, 13 insertions, 0 deletions
diff --git a/src/external/selinux.m4 b/src/external/selinux.m4
new file mode 100644
index 000000000..0c5d5294e
--- /dev/null
+++ b/src/external/selinux.m4
@@ -0,0 +1,13 @@
+dnl A macro to check the availability of SELinux
+AC_DEFUN([AM_CHECK_SELINUX],
+[
+ AC_CHECK_HEADERS(selinux/selinux.h,
+ [AC_CHECK_LIB(selinux, is_selinux_enabled,
+ [SELINUX_LIBS="-lselinux"],
+ [AC_MSG_ERROR([SELinux library is missing])]
+ )
+ ],
+ [AC_MSG_ERROR([SELinux headers are missing])])
+ AC_SUBST(SELINUX_LIBS)
+])
+