summaryrefslogtreecommitdiffstats
path: root/daemon/configure.ac
diff options
context:
space:
mode:
authorRichard Jones <rjones@trick.home.annexia.org>2009-08-12 16:56:09 +0100
committerRichard Jones <rjones@trick.home.annexia.org>2009-08-13 10:51:44 +0100
commit67a679afb17747b5ec392e56cf6121b085b38a3a (patch)
treef1df14f5e357459d0c95bb6deeb202222233211a /daemon/configure.ac
parent27566d8323e4a8af59f5649aeeaef97ebd55cbd0 (diff)
downloadlibguestfs-67a679afb17747b5ec392e56cf6121b085b38a3a.tar.gz
libguestfs-67a679afb17747b5ec392e56cf6121b085b38a3a.tar.xz
libguestfs-67a679afb17747b5ec392e56cf6121b085b38a3a.zip
Add 'setcon', 'getcon' commands to set and get the SELinux context.
Diffstat (limited to 'daemon/configure.ac')
-rw-r--r--daemon/configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/daemon/configure.ac b/daemon/configure.ac
index 43e331bf..62c28eec 100644
--- a/daemon/configure.ac
+++ b/daemon/configure.ac
@@ -64,6 +64,17 @@ if test "x$have_augeas" = "xyes"; then
AC_DEFINE([HAVE_AUGEAS],[1],[Define to 1 if you have Augeas])
fi
+dnl Check for libselinux (optional).
+AC_CHECK_HEADERS([selinux/selinux.h])
+AC_CHECK_LIB([selinux],[setexeccon],[
+ LIBS="-lselinux $LIBS"
+ have_libselinux="$ac_cv_header_selinux_selinux_h"
+ AC_CHECK_FUNCS([setcon getcon])
+ ],[have_libselinux=no])
+if test "x$have_libselinux" = "xyes"; then
+ AC_DEFINE([HAVE_LIBSELINUX],[1],[Define to 1 if you have libselinux])
+fi
+
dnl Check for XDR library.
AC_CHECK_LIB([portablexdr],[xdrmem_create],[],[
AC_SEARCH_LIBS([xdrmem_create],[rpc xdr nsl])