This change enables GSSAPI support by default when its prerequisites
are available. Without this change, the GSSAPI code does not get
tested when commits are made to Gerrit, even if the prerequisite
GSSAPI and Kerberos libraries are installed.
Signed-off-by: Andrew Korty <ajk@iu.edu>
Change-Id: If661cc6bb1188f3678f70189d5e333219c31052d
Reviewed-on: http://review.whamcloud.com/6740
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Minh Diep <minh.diep@intel.com>
Reviewed-by: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
fi
done
dnl We didn't find a usable Kerberos environment
fi
done
dnl We didn't find a usable Kerberos environment
- if test "x$KRBDIR" = "x"; then
+ if test "x$require_krb5" = "xyes" && "x$KRBDIR" = "x"; then
if test "x$krb5_with" = "x"; then
AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=)
else
if test "x$krb5_with" = "x"; then
AC_MSG_ERROR(Kerberos v5 with GSS support not found: consider --disable-gss or --with-krb5=)
else
AC_DEFUN([LC_CONFIG_SUNRPC],
[LB_LINUX_CONFIG_IM([SUNRPC],[],
AC_DEFUN([LC_CONFIG_SUNRPC],
[LB_LINUX_CONFIG_IM([SUNRPC],[],
- [AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])])
+ [if test x$sunrpc_required == xyes; then
+ AC_MSG_ERROR([kernel SUNRPC support is required by using GSS.])
+ fi])
[AC_MSG_CHECKING([whether to enable gss/krb5 support])
AC_ARG_ENABLE([gss],
[AC_HELP_STRING([--enable-gss], [enable gss/krb5 support])],
[AC_MSG_CHECKING([whether to enable gss/krb5 support])
AC_ARG_ENABLE([gss],
[AC_HELP_STRING([--enable-gss], [enable gss/krb5 support])],
+ [],[enable_gss='auto'])
AC_MSG_RESULT([$enable_gss])
AC_MSG_RESULT([$enable_gss])
- if test x$enable_gss == xyes; then
+ if test x$enable_gss != xno; then
+ sunrpc_required=$enable_gss
AC_DEFINE([HAVE_GSS], [1], [Define this if you enable gss])
AC_DEFINE([HAVE_GSS], [1], [Define this if you enable gss])
LB_LINUX_CONFIG_IM([CRYPTO_SHA512],[],
[AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
LB_LINUX_CONFIG_IM([CRYPTO_SHA512],[],
[AC_MSG_WARN([kernel SHA512 support is recommended by using GSS.])])
- AC_CHECK_LIB([gssapi], [gss_export_lucid_sec_context],
- [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi"],
- [AC_CHECK_LIB([gssglue], [gss_export_lucid_sec_context],
- [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue"],
- [AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])])],)
-
- AC_SUBST(GSSAPI_LIBS)
-
+ require_krb5=$enable_gss
+ require_krb5=no
+
+ if test x$KRBDIR != x; then
+ AC_CHECK_LIB([gssapi], [gss_export_lucid_sec_context],
+ [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi"],
+ [AC_CHECK_LIB([gssglue], [gss_export_lucid_sec_context],
+ [GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssglue"],
+ [if test x$enable_gss == xyes; then
+ AC_MSG_ERROR([libgssapi or libgssglue is not found, which is required by GSS.])
+ fi])],)
+ AC_SUBST(GSSAPI_LIBS)
+ fi