diff options
author | Michal Marek <mmarek@suse.cz> | 2008-04-07 09:26:30 +0000 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2008-04-07 09:26:30 +0000 |
commit | d0a4b50e198ffdeb80c68d8ac497f50a5b5798c8 (patch) | |
tree | ca4214e2221ade9e9c127e0cb5c0b77ef6cffce6 /configure.ac | |
parent | ebaf06a74132dc52fa37bb1b05799998c15827c4 (diff) |
- Fix the MIT / Heimdal check for good:
Define HAVE_GSSMIT if <gssapi/{gssapi.h,gssapi_generic.h,gssapi_krb5.h}> are
available, otherwise define HAVE_GSSHEIMDAL if <gssapi.h> is available.
Only define GSS_C_NT_HOSTBASED_SERVICE to gss_nt_service_name if
GSS_C_NT_HOSTBASED_SERVICE isn't declared by the gssapi headers. This should
avoid breakage in case we wrongly recognize Heimdal as MIT again.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index e0cd5bfb9..d9ba94ddd 100644 --- a/configure.ac +++ b/configure.ac @@ -983,15 +983,14 @@ if test x"$want_gss" = xyes; then gnu_gss=yes ], [ - dnl not found, check MIT - AC_CHECK_HEADER(gssapi/gssapi.h, - [ - dnl found in the given dirs - AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) - ], - [ - dnl not found, check for Heimdal - AC_CHECK_HEADER(gssapi.h, + dnl not found, check Heimdal or MIT + AC_CHECK_HEADERS( + [gssapi/gssapi.h gssapi/gssapi_generic.h gssapi/gssapi_krb5.h], + [], + [not_mit=1]) + if test "x$not_mit" = "x1"; then + dnl MIT not found, check for Heimdal + AC_CHECK_HEADER(gssapi.h, [ dnl found AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries]) @@ -1002,8 +1001,30 @@ if test x"$want_gss" = xyes; then AC_MSG_WARN(disabling GSSAPI since no header files was found) ] ) - ] - ) + else + dnl MIT found + AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) + dnl check if we have a really old MIT kerberos (<= 1.2) + AC_MSG_CHECKING([if gssapi headers declare GSS_C_NT_HOSTBASED_SERVICE]) + AC_TRY_COMPILE([ +#include <gssapi/gssapi.h> +#include <gssapi/gssapi_generic.h> +#include <gssapi/gssapi_krb5.h> + ],[ + gss_import_name( + (OM_uint32 *)0, + (gss_buffer_t)0, + GSS_C_NT_HOSTBASED_SERVICE, + (gss_name_t *)0); + ],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_DEFINE(HAVE_OLD_GSSMIT, 1, [if you have an old MIT gssapi library, lacking GSS_C_NT_HOSTBASED_SERVICE]) + ] + ) + + fi ] ) else |