l_getsepol requires openssl-devel, so add a configure check for
openssl/evp.h header and EVP_MD_CTX_create function, and disable
building l_getsepol in case they are missing.
Test-Parameters: trivial
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I31ddbc2f5300e9e38db9e00e2b7fbcac7f83d9e5
Reviewed-on: https://review.whamcloud.com/34183
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Thomas Stibor <t.stibor@gsi.de>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
AC_MSG_RESULT([$enable_ssk])
]) # LC_OPENSSL_SSK
AC_MSG_RESULT([$enable_ssk])
]) # LC_OPENSSL_SSK
+# LC_OPENSSL_GETSEPOL
+#
+# OpenSSL is needed for l_getsepol
+AC_DEFUN([LC_OPENSSL_GETSEPOL], [
+AC_MSG_CHECKING([whether openssl-devel is present])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <openssl/evp.h>
+
+ int main(void) {
+ EVP_MD_CTX *mdctx = EVP_MD_CTX_create();
+ }
+])],[
+ AC_DEFINE(HAVE_OPENSSL_GETSEPOL, 1, [openssl-devel is present])
+ enable_getsepol="yes"
+
+],[
+ enable_getsepol="no"
+ AC_MSG_WARN([
+
+No openssk-devel headers found, unable to build l_getsepol and SELinux status checking
+])
+])
+AC_MSG_RESULT([$enable_getsepol])
+]) # LC_OPENSSL_GETSEPOL
+
# LC_INODE_PERMISION_2ARGS
#
# up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
# LC_INODE_PERMISION_2ARGS
#
# up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
LC_GLIBC_SUPPORT_FHANDLES
LC_CONFIG_GSS
LC_OPENSSL_SSK
LC_GLIBC_SUPPORT_FHANDLES
LC_CONFIG_GSS
LC_OPENSSL_SSK
# 2.6.32
LC_BLK_QUEUE_MAX_SEGMENTS
# 2.6.32
LC_BLK_QUEUE_MAX_SEGMENTS
AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "xno")
AM_CONDITIONAL(XATTR_HANDLER, test "x$lb_cv_compile_xattr_handler_flags" = xyes)
AM_CONDITIONAL(SELINUX, test "$SELINUX" = "-lselinux")
AM_CONDITIONAL(HAVE_SYSTEMD, test "x$with_systemdsystemunitdir" != "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)
sbin_PROGRAMS += l_getsepol
endif
sbin_PROGRAMS += l_getsepol
endif
lib_LIBRARIES =
noinst_LIBRARIES =
lib_LIBRARIES =
noinst_LIBRARIES =