From c711a14d10bbb135f7228875dcfe085ea86d453f Mon Sep 17 00:00:00 2001 From: yury Date: Tue, 3 Oct 2006 11:43:56 +0000 Subject: [PATCH] - removed using pkg_config macros in configure tp avoid dependance on it. By now GSS and krb5 related stuff is detected by pure autoconf macros; - added detection of sunrpc in kernel as gss will not work if it is disabled. --- lustre/autoconf/lustre-core.m4 | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 3802079..bc78cc9 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -649,12 +649,36 @@ AC_MSG_RESULT([$enable_client])]) AC_DEFUN([LC_CONFIG_GSS], [AC_MSG_CHECKING([whether to enable gss/krb5 support]) AC_ARG_ENABLE([gss], - AC_HELP_STRING([--enable-gss], - [enable gss/krb5 support]), + AC_HELP_STRING([--enable-gss], [enable gss/krb5 support]), [],[enable_gss='no']) AC_MSG_RESULT([$enable_gss]) -if test x$enable_gss != xno; then - PKG_CHECK_MODULES([GSSAPI], [libgssapi >= 0.10]) + +if test x$enable_gss == xyes; then + AC_MSG_CHECKING([whether CONFIG_SUNRPC is in kernel config file]) + if test -f $LINUX/.config && grep -q CONFIG_SUNRPC=y $LINUX/.config; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Sunrpc is not enabled in kernel, GSS module can't build, consider --disable-gss.]) + fi + + GSSAPI_LIBS="" + + OLD_LIBS="$LIBS" + AC_CHECK_LIB(gssapi, gss_init_sec_context, [ + GSSAPI_LIBS="$GSSAPI_LDFLAGS -lgssapi" + enable_gss='yes' + ], [ + enable_gss='no' + ], + ) + LIBS="$OLD_LIBS" + + if test x$enable_gss != xyes; then + AC_MSG_ERROR([libgssapi is not found, consider --disable-gss.]) + fi + + AC_SUBST(GSSAPI_LIBS) AC_KERBEROS_V5 fi ]) -- 1.8.3.1