summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-08-10 03:37:06 +0200
committerGuillem Jover <guillem@debian.org>2014-08-15 03:41:58 +0200
commit464ebf59ed3b91684e01255c4070f3eb7ea63af9 (patch)
treea018b128990cad8a03f126c3161a996817d1784a /m4
parent1878855c4a3eaa5a544c81e24b5a990d6139ff7b (diff)
downloaddpkg-464ebf59ed3b91684e01255c4070f3eb7ea63af9.tar.gz
libcompat: Only build the compatibility selinux code if requested
If we are not using libselinux, then we cannot build the selinux compatibility code as it requires the library. Also fixes build failures on non-Linux systems, where the library is not available. Closes: #757637
Diffstat (limited to 'm4')
-rw-r--r--m4/dpkg-libs.m45
1 files changed, 3 insertions, 2 deletions
diff --git a/m4/dpkg-libs.m4 b/m4/dpkg-libs.m4
index 156da2f0b..5c45b0f0b 100644
--- a/m4/dpkg-libs.m4
+++ b/m4/dpkg-libs.m4
@@ -92,14 +92,15 @@ if test "x$with_selinux" != "xno"; then
[AC_DEFINE([HAVE_SETEXECFILECON], [1],
[Define to 1 if SELinux setexecfilecon is present])
])
- AM_CONDITIONAL(HAVE_SETEXECFILECON,
- [test "x$ac_cv_lib_selinux_setexecfilecon" = "xyes"])
AC_CHECK_HEADER([selinux/selinux.h],,
[if test -n "$with_selinux"; then
AC_MSG_FAILURE([selinux header not found])
fi])
fi
+AM_CONDITIONAL(WITH_SELINUX, [test "x$with_selinux" = "xyes"])
+AM_CONDITIONAL(HAVE_SETEXECFILECON,
+ [test "x$ac_cv_lib_selinux_setexecfilecon" = "xyes"])
])# DPKG_LIB_SELINUX
# _DPKG_CHECK_LIB_CURSES_NARROW