Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | Avoid to call AC_TRY_RUN |
| 2 | |
| 3 | Upstream-Status: Inappropriate [configuration] |
| 4 | |
| 5 | Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO |
| 6 | on cross-compile environment by definition AC_ARG_ENABLE enable-spnego |
| 7 | |
| 8 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> |
| 9 | --- |
| 10 | cmulocal/sasl2.m4 | 13 ++++++++++++- |
| 11 | 1 file changed, 12 insertions(+), 1 deletion(-) |
| 12 | |
| 13 | diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4 |
| 14 | index 3c2841a..a5ecf81 100644 |
| 15 | --- a/cmulocal/sasl2.m4 |
| 16 | +++ b/cmulocal/sasl2.m4 |
| 17 | @@ -281,6 +281,17 @@ if test "$gssapi" != no; then |
| 18 | |
| 19 | cmu_save_LIBS="$LIBS" |
| 20 | LIBS="$LIBS $GSSAPIBASE_LIBS" |
| 21 | + AC_ARG_ENABLE([spnego], |
| 22 | + [AC_HELP_STRING([--enable-spnego=<DIR>], |
| 23 | + [enable SPNEGO support in GSSAPI libraries [no]])], |
| 24 | + [spnego=$enableval], |
| 25 | + [spnego=no]) |
| 26 | + |
| 27 | + if test "$spnego" = no; then |
| 28 | + echo "no" |
| 29 | + elif test "$spnego" = yes; then |
| 30 | + AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) |
| 31 | + else |
| 32 | AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) |
| 33 | AC_TRY_RUN([ |
| 34 | #ifdef HAVE_GSSAPI_H |
| 35 | @@ -308,7 +319,7 @@ int main(void) |
| 36 | AC_MSG_RESULT(yes) ], |
| 37 | AC_MSG_RESULT(no)) |
| 38 | LIBS="$cmu_save_LIBS" |
| 39 | - |
| 40 | + fi |
| 41 | else |
| 42 | AC_MSG_RESULT([disabled]) |
| 43 | fi |
| 44 | -- |
| 45 | 1.7.10.4 |
| 46 | |