Add composite name support (for when it shows up in libraries).
[shibboleth/cpp-sp-resolver.git] / configure.ac
index 711e607..3902b63 100644 (file)
@@ -386,8 +386,7 @@ if test x"$want_gss" = xyes; then
        LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
     fi
     if test -f "$GSSAPI_ROOT/bin/krb5-config"; then
-      dnl krb5-config doesn't have --libs-only-L or similar, put everything
-      dnl into LIBS
+      dnl krb5-config does not have --libs-only-L or similar, put everything into LIBS
       gss_libs=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi`
     else
       if test "x$not_mit" = "x1"; then
@@ -406,6 +405,18 @@ if test x"$want_gss" = xyes; then
     [AC_MSG_RESULT([yes])AC_DEFINE([HAVE_GSSAPI_NAMINGEXTS],[1],[Define to 1 if GSS-API naming extensions are available.])],
     [AC_MSG_RESULT([no])])
 
+  AC_MSG_CHECKING([whether GSS-API composite name import is available])
+  AC_COMPILE_IFELSE(
+    [AC_LANG_PROGRAM([[#include <gssapi/gssapi_ext.h>]],
+    [[
+    OM_uint32 minor;
+    gss_name_t srcname;
+    gss_buffer_desc importbuf;
+    gss_import_name(&minor, &importbuf, GSS_C_NT_EXPORT_NAME_COMPOSITE, &srcname);
+    ]])],
+    [AC_MSG_RESULT([yes])AC_DEFINE([SHIBRESOLVER_HAVE_GSSAPI_COMPOSITE_NAME],[1],[Define to 1 if GSS-API composite name import is available.])],
+    [AC_MSG_RESULT([no])])
+
 else
   CPPFLAGS="$save_CPPFLAGS"
 fi