blob: 1e6f99603cb36859eb93bd0e1386cc678c916b7d [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 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
Patrick Williamsb48b7b42016-08-17 15:04:38 -05005
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>
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080012---
Andrew Geissler9aee5002022-03-30 16:27:02 +000013 m4/sasl2.m4 | 14 +++++++++++++-
14 1 file changed, 13 insertions(+), 1 deletion(-)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080015
16diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
Andrew Geissler9aee5002022-03-30 16:27:02 +000017index 80371ef..ff70083 100644
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080018--- a/m4/sasl2.m4
19+++ b/m4/sasl2.m4
Andrew Geissler9aee5002022-03-30 16:27:02 +000020@@ -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([
Patrick Williamsb48b7b42016-08-17 15:04:38 -050037 #ifdef HAVE_GSSAPI_H
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038 #include <gssapi.h>
Andrew Geissler9aee5002022-03-30 16:27:02 +000039@@ -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 ])
Patrick Williamsb48b7b42016-08-17 15:04:38 -050043-
44+ fi
45 else
46 AC_MSG_RESULT([disabled])
47 fi
Andrew Geissler9aee5002022-03-30 16:27:02 +000048--
492.25.1
50