blob: 1e6f99603cb36859eb93bd0e1386cc678c916b7d [file] [log] [blame]
From 288430d3c2d3f36a4c9d40c4fffa85288f44549a Mon Sep 17 00:00:00 2001
From: "Roy.Li" <rongqing.li@windriver.com>
Date: Tue, 25 Jun 2013 09:22:59 +0800
Subject: [PATCH] Avoid to call AC_TRY_RUN
Upstream-Status: Inappropriate [configuration]
Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO
on cross-compile environment by definition AC_ARG_ENABLE enable-spnego
Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
m4/sasl2.m4 | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
index 80371ef..ff70083 100644
--- a/m4/sasl2.m4
+++ b/m4/sasl2.m4
@@ -316,6 +316,18 @@ if test "$gssapi" != no; then
AC_CACHE_CHECK([for SPNEGO support in GSSAPI libraries],[ac_cv_gssapi_supports_spnego],[
cmu_save_LIBS="$LIBS"
LIBS="$LIBS $GSSAPIBASE_LIBS"
+ AC_ARG_ENABLE([spnego],
+ [AC_HELP_STRING([--enable-spnego=<DIR>],
+ [enable SPNEGO support in GSSAPI libraries [no]])],
+ [spnego=$enableval],
+ [spnego=no])
+
+ if test "$spnego" = no; then
+ echo "no"
+ elif test "$spnego" = yes; then
+ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
+ else
+ AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
AC_TRY_RUN([
#ifdef HAVE_GSSAPI_H
#include <gssapi.h>
@@ -343,7 +355,7 @@ int main(void)
AS_IF([test "$ac_cv_gssapi_supports_spnego" = yes],[
AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
])
-
+ fi
else
AC_MSG_RESULT([disabled])
fi
--
2.25.1