Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 288430d3c2d3f36a4c9d40c4fffa85288f44549a Mon Sep 17 00:00:00 2001 |
| 2 | From: "Roy.Li" <rongqing.li@windriver.com> |
| 3 | Date: Tue, 25 Jun 2013 09:22:59 +0800 |
| 4 | Subject: [PATCH] Avoid to call AC_TRY_RUN |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 5 | |
| 6 | Upstream-Status: Inappropriate [configuration] |
| 7 | |
| 8 | Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO |
| 9 | on cross-compile environment by definition AC_ARG_ENABLE enable-spnego |
| 10 | |
| 11 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | --- |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 13 | m4/sasl2.m4 | 14 +++++++++++++- |
| 14 | 1 file changed, 13 insertions(+), 1 deletion(-) |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | |
| 16 | diff --git a/m4/sasl2.m4 b/m4/sasl2.m4 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 17 | index 80371ef..ff70083 100644 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | --- a/m4/sasl2.m4 |
| 19 | +++ b/m4/sasl2.m4 |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 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([ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 37 | #ifdef HAVE_GSSAPI_H |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | #include <gssapi.h> |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 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 | ]) |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 43 | - |
| 44 | + fi |
| 45 | else |
| 46 | AC_MSG_RESULT([disabled]) |
| 47 | fi |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 48 | -- |
| 49 | 2.25.1 |
| 50 | |