summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 12 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index c0789de29f..08f36469a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -115,15 +115,18 @@ PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.3.2 ])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
-PKG_CHECK_MODULES(SELINUX, libselinux,
- have_selinux=yes,
- have_selinux=no)
-if test "x$have_selinux" = "xyes" ; then
- AC_DEFINE(HAVE_SELINUX, [], [Define if SELINUX is available])
+have_selinux=no
+AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
+if test "x$enable_selinux" != "xno"; then
+ PKG_CHECK_MODULES(SELINUX, [ libselinux ],
+ [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
+ AC_SUBST(SELINUX_CFLAGS)
+ AC_SUBST(SELINUX_LIBS)
+ if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
+ AC_MSG_ERROR([*** SELinux support requested but libraries not found])
+ fi
fi
-AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
-AC_SUBST(SELINUX_CFLAGS)
-AC_SUBST(SELINUX_LIBS)
+AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
AC_ARG_ENABLE([tcpwrap],
AS_HELP_STRING([--disable-tcpwrap],[Disable optional TCP wrappers support]),
@@ -230,7 +233,7 @@ if test "x$enable_libcryptsetup" != "xno"; then
AC_SUBST(LIBCRYPTSETUP_CFLAGS)
AC_SUBST(LIBCRYPTSETUP_LIBS)
if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
- AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
+ AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])