I've had some trouble compiling GSSAPI on SuSE Enterprise 9 using Heimdal. It turns out that this installation has /usr/include/heimdal/gssapi.h rather than gssapi/gssapi.h. krb5-config correctly sets -I/usr/include/heimdal in the CFLAGS. Looking back, there was a similar issue a few months ago:- http://www.dovecot.org/list/dovecot/2006-July/014945.html I'm a complete newbie to autotools but here's my attempt at a patch inspired by http://ximbiot.com/cvs/cvshome/dev/patches/gss - which I Googled for ;) I was hampered by the version of aclocal (and possibly the rest of autotools) being out-of-date on SuSE Enterprise 9 ... Chris -- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094 --- dovecot-1.0.rc15/configure.in.orig 2006-11-18 23:41:31.000000000 +0000 +++ dovecot-1.0.rc15/configure.in 2006-11-28 15:25:16.889043097 +0000 @@ -1438,6 +1438,12 @@ CFLAGS="$CFLAGS `krb5-config --cflags gssapi`" AC_CHECK_HEADER([gssapi/gssapi.h], [ AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support) + AC_DEFINE(HAVE_GSSAPI_GSSAPI_H,, GSSAPI headers in gssapi/gssapi.h) + have_gssapi=yes + ]) + AC_CHECK_HEADER([gssapi.h], [ + AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support) + AC_DEFINE(HAVE_GSSAPI_H,, GSSAPI headers in gssapi.h) have_gssapi=yes ]) CFLAGS=$old_CFLAGS --- dovecot-1.0.rc15/config.h.in.orig 2006-11-18 23:42:14.000000000 +0000 +++ dovecot-1.0.rc15/config.h.in 2006-11-28 15:27:24.584537526 +0000 @@ -75,6 +75,12 @@ /* Build with GSSAPI support */ #undef HAVE_GSSAPI +/* GSSAPI headers in gssapi/gssapi.h */ +#undef HAVE_GSSAPI_GSSAPI_H + +/* GSSAPI headers in gssapi.h */ +#undef HAVE_GSSAPI_H + /* Define if you have the iconv() function. */ #undef HAVE_ICONV --- dovecot-1.0.rc15/src/auth/mech-gssapi.c.orig 2006-09-22 15:55:18.000000000 +0100 +++ dovecot-1.0.rc15/src/auth/mech-gssapi.c 2006-11-28 15:37:25.733077117 +0000 @@ -24,7 +24,13 @@ #ifdef HAVE_GSSAPI +#ifdef HAVE_GSSAPI_H +#include <gssapi.h> +#endif + +#ifdef HAVE_GSSAPI_GSSAPI_H #include <gssapi/gssapi.h> +#endif /* Non-zero flags defined in RFC 2222 */ enum sasl_gssapi_qop {