1From 288430d3c2d3f36a4c9d40c4fffa85288f44549a Mon Sep 17 00:00:00 2001 2From: "Roy.Li" <rongqing.li@windriver.com> 3Date: Tue, 25 Jun 2013 09:22:59 +0800 4Subject: [PATCH] Avoid to call AC_TRY_RUN 5 6Upstream-Status: Inappropriate [configuration] 7 8Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO 9on cross-compile environment by definition AC_ARG_ENABLE enable-spnego 10 11Signed-off-by: Roy.Li <rongqing.li@windriver.com> 12--- 13 m4/sasl2.m4 | 14 +++++++++++++- 14 1 file changed, 13 insertions(+), 1 deletion(-) 15 16diff --git a/m4/sasl2.m4 b/m4/sasl2.m4 17index 80371ef..ff70083 100644 18--- a/m4/sasl2.m4 19+++ b/m4/sasl2.m4 20@@ -316,6 +316,18 @@ if test "$gssapi" != no; then 21 AC_CACHE_CHECK([for SPNEGO support in GSSAPI libraries],[ac_cv_gssapi_supports_spnego],[ 22 cmu_save_LIBS="$LIBS" 23 LIBS="$LIBS $GSSAPIBASE_LIBS" 24+ AC_ARG_ENABLE([spnego], 25+ [AC_HELP_STRING([--enable-spnego=<DIR>], 26+ [enable SPNEGO support in GSSAPI libraries [no]])], 27+ [spnego=$enableval], 28+ [spnego=no]) 29+ 30+ if test "$spnego" = no; then 31+ echo "no" 32+ elif test "$spnego" = yes; then 33+ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) 34+ else 35+ AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) 36 AC_TRY_RUN([ 37 #ifdef HAVE_GSSAPI_H 38 #include <gssapi.h> 39@@ -343,7 +355,7 @@ int main(void) 40 AS_IF([test "$ac_cv_gssapi_supports_spnego" = yes],[ 41 AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) 42 ]) 43- 44+ fi 45 else 46 AC_MSG_RESULT([disabled]) 47 fi 48-- 492.25.1 50 51