2 dnl # Check to see if the selinux libraries are available. If they
3 dnl # are then they will be consulted during mount to determine if
4 dnl # selinux is enabled or disabled.
6 AC_DEFUN([ZFS_AC_CONFIG_USER_LIBSELINUX], [
8 [AS_HELP_STRING([--with-selinux],
9 [support selinux @<:@default=check@:>@])],
14 AS_IF([test "x$with_selinux" != xno], [
15 AC_CHECK_HEADER([selinux/selinux.h], [
16 AC_CHECK_LIB([selinux], [is_selinux_enabled], [
17 AC_SUBST([LIBSELINUX], ["-lselinux"])
18 AC_DEFINE([HAVE_LIBSELINUX], 1,
19 [Define if you have selinux])
21 AS_IF([test "x$with_selinux" != xcheck],
23 [--with-selinux given but unavailable])
27 AS_IF([test "x$with_selinux" != xcheck],
29 [--with-selinux given but unavailable])
33 AC_MSG_CHECKING([for selinux support])