f9c172b
diff -u -r cyrus-sasl-2.1.21-orig/cmulocal/sasl2.m4 cyrus-sasl-2.1.21/cmulocal/sasl2.m4
f9c172b
--- cyrus-sasl-2.1.21-orig/cmulocal/sasl2.m4	2006-08-01 08:29:59.000000000 +0200
f9c172b
+++ cyrus-sasl-2.1.21/cmulocal/sasl2.m4	2006-08-01 08:31:32.000000000 +0200
f9c172b
@@ -257,7 +257,21 @@
f9c172b
 
f9c172b
   cmu_save_LIBS="$LIBS"
f9c172b
   LIBS="$LIBS $GSSAPIBASE_LIBS"
f9c172b
-  AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
f9c172b
+  dnl AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity)
f9c172b
+  AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_KRB5_H,,[Define if you have the gssapi/gssapi_krb5.h header file]))
f9c172b
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
f9c172b
+#ifdef HAVE_GSSAPI_H
f9c172b
+#include <gssapi.h>
f9c172b
+#else
f9c172b
+#include <gssapi/gssapi.h>
f9c172b
+#endif
f9c172b
+#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
f9c172b
+#include <gssapi/gssapi_krb5.h>
f9c172b
+#endif
f9c172b
+]],[[gsskrb5_register_acceptor_identity("");]])
f9c172b
+],[AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY,,
f9c172b
+             [Define if your GSSAPI implimentation defines GSSKRB5_REGISTER_ACCEPTOR_IDENTITY])
f9c172b
+])
f9c172b
   LIBS="$cmu_save_LIBS"
f9c172b
 else
f9c172b
   AC_MSG_RESULT([disabled])
f9c172b
diff -u -r cyrus-sasl-2.1.21-orig/plugins/gssapi.c cyrus-sasl-2.1.21/plugins/gssapi.c
f9c172b
--- cyrus-sasl-2.1.21-orig/plugins/gssapi.c	2004-07-21 16:39:06.000000000 +0200
f9c172b
+++ cyrus-sasl-2.1.21/plugins/gssapi.c	2006-08-01 08:30:26.000000000 +0200
f9c172b
@@ -50,6 +50,9 @@
f9c172b
 #else
f9c172b
 #include <gssapi/gssapi.h>
f9c172b
 #endif
f9c172b
+#ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
f9c172b
+#include <gssapi/gssapi_krb5.h> 
f9c172b
+#endif
f9c172b
 
f9c172b
 #ifdef WIN32
f9c172b
 #  include <winsock2.h>