changeset 4862:bddfbc560857 HEAD

Some systems have gssapi elsewhere than gssapi/gssapi.h. So check also plain gssapi.h. Based on patch by Chris Wakelin
author Timo Sirainen <tss@iki.fi>
date Sun, 03 Dec 2006 16:12:22 +0200
parents a688269c0dd4
children d13324a8e242
files configure.in src/auth/mech-gssapi.c
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Sun Dec 03 15:50:44 2006 +0200
+++ b/configure.in	Sun Dec 03 16:12:22 2006 +0200
@@ -1482,9 +1482,16 @@
 			old_CFLAGS=$CFLAGS
 			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_H,, GSSAPI headers in gssapi.h)
+				have_gssapi=yes
+			])
+			if test $have_gssapi = yes; then
+				AC_DEFINE(HAVE_GSSAPI,, Build with GSSAPI support)
+			fi
 			CFLAGS=$old_CFLAGS
 		fi
 	fi
--- a/src/auth/mech-gssapi.c	Sun Dec 03 15:50:44 2006 +0200
+++ b/src/auth/mech-gssapi.c	Sun Dec 03 16:12:22 2006 +0200
@@ -24,7 +24,11 @@
 
 #ifdef HAVE_GSSAPI
 
-#include <gssapi/gssapi.h>
+#ifdef HAVE_GSSAPI_GSSAPI_H
+#  include <gssapi/gssapi.h>
+#elif defined (HAVE_GSSAPI_H)
+#  include <gssapi.h>
+#endif
 
 /* Non-zero flags defined in RFC 2222 */
 enum sasl_gssapi_qop {