summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@src.gnome.org>2007-09-13 08:27:21 +0000
committerAlexander Larsson <alexl@src.gnome.org>2007-09-13 08:27:21 +0000
commit9d2619d92315cae5edfc66896e70822f9d5de1eb (patch)
tree9afe4afbe96ade37590e94bd00ce2c8bbe5503df /configure.ac
parent4bed9f54c2cb8fc1900a881b5cc3e50c804f0b23 (diff)
downloadgvfs-9d2619d92315cae5edfc66896e70822f9d5de1eb.tar.gz
Find selinux Define _GNU_SOURCE
Find selinux Define _GNU_SOURCE Original git commit by Alexander Larsson <alex@greebo.(none)> at 1159799343 +0200 svn path=/trunk/; revision=48
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 0f539e96..f235e1df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,28 @@ AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
+dnl ****************************
+dnl *** Check for libselinux ***
+dnl ****************************
+AC_ARG_ENABLE(selinux, [ --disable-selinux build without selinux support])
+msg_selinux=no
+SELINUX_LIBS=
+if test "x$enable_selinux" != "xno"; then
+
+ AC_CHECK_LIB(selinux, is_selinux_enabled,
+ [AC_CHECK_HEADERS(selinux/selinux.h,
+ [AC_SEARCH_LIBS(lgetfilecon_raw, selinux,
+ [AC_DEFINE(HAVE_SELINUX, 1, [Define to 1 if libselinux is available])
+ SELINUX_LIBS="-lselinux"
+ msg_selinux=yes])
+ ])
+ ])
+fi
+AC_SUBST(SELINUX_LIBS)
+
+dnl Globally define_GNU_SOURCE and therefore enable the GNU extensions
+AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
+
dnl ==========================================================================
dnl Turn on the additional warnings last, so -Werror doesn't affect other tests.