Whamcloud - gitweb
LU-3289 gss: Add userspace support for GSS null and sk
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 0d5c599..f056134 100644 (file)
@@ -316,9 +316,9 @@ kernel SUNRPC support is required by using GSS.
 # parts are depend on linux platform.
 #
 AC_DEFUN([LC_CONFIG_GSS], [
-AC_MSG_CHECKING([whether to enable gss/krb5 support])
+AC_MSG_CHECKING([whether to enable gss support])
 AC_ARG_ENABLE([gss],
-       [AC_HELP_STRING([--enable-gss], [enable gss/krb5 support])],
+       [AC_HELP_STRING([--enable-gss], [enable gss support])],
        [], [enable_gss="auto"])
 AC_MSG_RESULT([$enable_gss])
 
@@ -358,7 +358,25 @@ AS_IF([test "x$enable_gss" != xno], [
 ])
 ]) # LC_CONFIG_GSS
 
+# LC_HAVE_VOID_OPENSSL_HMAC_FUNCS
 #
+# OpenSSL 1.0+ return int for HMAC functions but previous versions do not
+AC_DEFUN([LC_HAVE_VOID_OPENSSL_HMAC_FUNCS], [
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+       #include <openssl/hmac.h>
+       #include <openssl/evp.h>
+
+       int main(void) {
+               int rc;
+               HMAC_CTX ctx;
+               HMAC_CTX_init(&ctx);
+               rc = HMAC_Init_ex(&ctx, "test", 4, EVP_md_null(), NULL);
+       }
+])],[],[AC_DEFINE(HAVE_VOID_OPENSSL_HMAC_FUNCS, 1,
+               [OpenSSL HMAC functions return void instead of int])
+])
+]) # LC_HAVE_VOID_OPENSSL_HMAC_FUNCS
+
 # LC_INODE_PERMISION_2ARGS
 #
 # up to v2.6.27 had a 3 arg version (inode, mask, nameidata)
@@ -2104,6 +2122,7 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC_GLIBC_SUPPORT_FHANDLES
        LC_CONFIG_RMTCLIENT
        LC_CONFIG_GSS
+       LC_HAVE_VOID_OPENSSL_HMAC_FUNCS
 
        # 2.6.32
        LC_BLK_QUEUE_MAX_SEGMENTS