%bcond_without o2ib
%bcond_with kfi
%bcond_with gni
+%bcond_without l_getsepol
%if %{with multiple_lnds}
%global enable_multi_lnds 1
#suse don't support selinux
BuildRequires: pkgconfig(libselinux)
%endif
+%if %{with l_getsepol}
+BuildRequires: pkgconfig(libselinux) openssl-devel
+%endif
%if %{with lustre_modules}
%if %{with mofed}
%if 0%{?mofed_source} > 0
%{?with_kfi:--with-kfi=/usr/src/cray-kfabric/default} \
%{?with_gni:--enable-gni} \
${WITH_O2IB} \
+ %{!?with_l_getsepol:--disable-l_getsepol} \
--with-linux=%{kdir} \
--with-linux-obj=%{kobjdir} \
--with-kmp-moddir=%{kmoddir}/%{name}
CFLAGS="$saved_flags"
]) # LC_OPENSSL_GETSEPOL
+# LC_GCONFIG_GETSEPOL
+AC_DEFUN([LC_CONFIG_GETSEPOL], [
+AC_ARG_ENABLE([l_getsepol], [AS_HELP_STRING([--disable-l_getsepol],
+ [build the l_getsepol utility])], [config_getsepol="no"],
+ [config_getsepol="yes"])
+AC_MSG_CHECKING([whether to build l_getsepol])
+AC_MSG_RESULT([$config_getsepol])
+]) # LC_GETSEPOL
+
# LC_HAVE_LIBAIO
AC_DEFUN([LC_HAVE_LIBAIO], [
AC_CHECK_HEADER([libaio.h],
AM_CONDITIONAL(ENABLE_BASH_COMPLETION, test "x$with_bash_completion_dir" != "xno")
AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
-AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes)
+AM_CONDITIONAL(GETSEPOL, test x$enable_getsepol = xyes &&
+ test x$config_getsepol = xyes)
AM_CONDITIONAL(LLCRYPT, test x$enable_llcrypt = xyes)
AM_CONDITIONAL(LIBAIO, test x$enable_libaio = xyes)
]) # LC_CONDITIONALS