Fix GSS extension tests and headers for Heimdal/GNU
authorScott Cantor <cantor.2@osu.edu>
Thu, 28 Apr 2011 03:03:59 +0000 (03:03 +0000)
committerScott Cantor <cantor.2@osu.edu>
Thu, 28 Apr 2011 03:03:59 +0000 (03:03 +0000)
configure.ac
src/shibresolver/resolver.cpp

index 1ff8bec..eba8497 100644 (file)
@@ -400,7 +400,14 @@ if test x"$want_gss" = xyes; then
 
   AC_MSG_CHECKING([whether GSS-API naming extensions are available])
   AC_COMPILE_IFELSE(
 
   AC_MSG_CHECKING([whether GSS-API naming extensions are available])
   AC_COMPILE_IFELSE(
-    [AC_LANG_PROGRAM([[#include <gssapi/gssapi_ext.h>]],
+    [AC_LANG_PROGRAM([[
+#ifdef SHIBRESOLVER_HAVE_GSSGNU
+# include <gss.h>
+#elif defined SHIBRESOLVER_HAVE_GSSMIT
+# include <gssapi/gssapi_ext.h>
+#else
+# include <gssapi.h>
+#endif]],
     [[gss_get_name_attribute(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);]])],
     [AC_MSG_RESULT([yes])AC_DEFINE([SHIBRESOLVER_HAVE_GSSAPI_NAMINGEXTS],[1],[Define to 1 if GSS-API naming extensions are available.])],
     [AC_MSG_RESULT([no])])
     [[gss_get_name_attribute(NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);]])],
     [AC_MSG_RESULT([yes])AC_DEFINE([SHIBRESOLVER_HAVE_GSSAPI_NAMINGEXTS],[1],[Define to 1 if GSS-API naming extensions are available.])],
     [AC_MSG_RESULT([no])])
index a5e03b5..0c7ec52 100644 (file)
@@ -23,7 +23,9 @@
 #include "internal.h"
 
 #ifdef SHIBRESOLVER_HAVE_GSSAPI_NAMINGEXTS
 #include "internal.h"
 
 #ifdef SHIBRESOLVER_HAVE_GSSAPI_NAMINGEXTS
-# include <gssapi/gssapi_ext.h>
+# ifdef SHIBRESOLVER_HAVE_GSSMIT
+#  include <gssapi/gssapi_ext.h>
+# endif
 #endif
 
 #include <shibsp/exceptions.h>
 #endif
 
 #include <shibsp/exceptions.h>