1 Index: configure.in 2 =================================================================== 3 RCS file: /cvs/gnome/evolution-data-server/configure.in,v 4 retrieving revision 1.159.2.3 5 diff -u -r1.159.2.3 configure.in 6 --- configure.in 22 Mar 2006 11:21:06 -0000 1.159.2.3 7 +++ configure.in 4 Apr 2006 11:00:59 -0000 8 @@ -885,13 +885,18 @@ 9 10 mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5" 11 heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi" 12 + sunlibs="-lkrb5 -lgss" 13 AC_CACHE_CHECK([for Kerberos 5], ac_cv_lib_kerberos5, 14 [ 15 LDFLAGS="$LDFLAGS -L$with_krb5_libs $mitlibs" 16 AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$mitlibs", 17 [ 18 LDFLAGS="$LDFLAGS_save -L$with_krb5_libs $heimlibs" 19 - AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", ac_cv_lib_kerberos5="no") 20 + AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$heimlibs", 21 + [ 22 + LDFLAGS="$LDFLAGS_save -L$with_krb5_libs $sunlibs" 23 + AC_TRY_LINK_FUNC(krb5_init_context, ac_cv_lib_kerberos5="$sunlibs", ac_cv_lib_kerberos5="no") 24 + ]) 25 ]) 26 LDFLAGS="$LDFLAGS_save" 27 ]) 28 @@ -906,13 +911,23 @@ 29 fi 30 msg_krb5="yes (MIT)" 31 else 32 - AC_DEFINE(HAVE_HEIMDAL_KRB5,1,[Define if you have Heimdal]) 33 - if test -z "$with_krb5_includes"; then 34 - KRB5_CFLAGS="-I$with_krb5/include/heimdal" 35 + if test "$ac_cv_lib_kerberos5" = "$heimlibs"; then 36 + AC_DEFINE(HAVE_HEIMDAL_KRB5,1,[Define if you have Heimdal]) 37 + if test -z "$with_krb5_includes"; then 38 + KRB5_CFLAGS="-I$with_krb5/include/heimdal" 39 + else 40 + KRB5_CFLAGS="-I$with_krb5_includes" 41 + fi 42 + msg_krb5="yes (Heimdal)" 43 else 44 - KRB5_CFLAGS="-I$with_krb5_includes" 45 + AC_DEFINE(HAVE_SUN_KRB5,1,[Define if you have Sun Kerberosv5]) 46 + if test -z "$with_krb5_includes"; then 47 + KRB5_CFLAGS="-I$with_krb5/include/kerberosv5" 48 + else 49 + KRB5_CFLAGS="-I$with_krb5_includes" 50 + fi 51 + msg_krb5="yes (Sun)" 52 fi 53 - msg_krb5="yes (Heimdal)" 54 fi 55 KRB5_LDFLAGS="-L$with_krb5_libs $ac_cv_lib_kerberos5" 56 fi 57 Index: camel/camel-sasl-gssapi.c 58 =================================================================== 59 RCS file: /cvs/gnome/evolution-data-server/camel/camel-sasl-gssapi.c,v 60 retrieving revision 1.15 61 diff -u -r1.15 camel-sasl-gssapi.c 62 --- camel/camel-sasl-gssapi.c 31 Aug 2005 04:21:56 -0000 1.15 63 +++ camel/camel-sasl-gssapi.c 30 May 2006 07:32:40 -0000 64 @@ -39,9 +39,14 @@ 65 #ifdef HAVE_MIT_KRB5 66 #include <gssapi/gssapi.h> 67 #include <gssapi/gssapi_generic.h> 68 -#else /* HAVE_HEIMDAL_KRB5 */ 69 +#endif 70 +#ifdef HAVE_HEIMDAL_KRB5 71 #include <gssapi.h> 72 #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE 73 +#else /* HAVE_SUN_KRB5 */ 74 +#include <gssapi/gssapi.h> 75 +#include <gssapi/gssapi_ext.h> 76 +extern gss_OID gss_nt_service_name; 77 #endif 78 #include <errno.h> 79 80