]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add check for GSS_C_NT_HOSTBASED_SERVICE and remove duplication from
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 11 Sep 2006 20:10:49 +0000 (20:10 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Mon, 11 Sep 2006 20:10:49 +0000 (20:10 +0000)
cups-gssapi.m4.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@5946 7a7537e8-13f0-0310-91df-b6672ffda945

config-scripts/cups-gssapi.m4
config.h.in
cups/http-private.h

index 331127254a42aee853e03532a99eeeffffbd6a0c..8a78ddbd462b64ea6dba4bfaaa5512640ac1e13c 100644 (file)
@@ -52,85 +52,38 @@ if test x$enable_gssapi != xno; then
 
                SAVELIBS="$LIBS"
                LIBS="$LIBS $LIBGSSAPI"
+
                AC_CHECK_FUNC(gsskrb5_register_acceptor_identity, 
                              AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY))
-               LIBS="$SAVELIBS"
-               AC_TRY_COMPILE([ #include <krb5.h> ],
-                              [ char *tmp = heimdal_version; ],
-                              AC_DEFINE(HAVE_HEIMDAL))
-       fi
-fi
 
-AC_SUBST(LIBGSSAPI)
+               AC_MSG_CHECKING(for GSS_C_NT_HOSTBASED_SERVICE)
+               if test $ac_cv_header_gssapi_gssapi_h = yes; then
+                       AC_TRY_COMPILE([ #include <gssapi/gssapi.h> ],
+                                      [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
+                                      AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
+                                      AC_MSG_RESULT(yes),
+                                      AC_MSG_RESULT(no))
+               else
+                       AC_TRY_COMPILE([ #include <gssapi.h> ],
+                                      [ gss_OID foo = GSS_C_NT_HOSTBASED_SERVICE; ],
+                                      AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE)
+                                      AC_MSG_RESULT(yes),
+                                      AC_MSG_RESULT(no))
+               fi
 
-dnl
-dnl End of "$Id$".
-dnl
-dnl
-dnl   "$Id: cups-gssapi.m4 5916 2006-08-30 20:46:47Z mike $"
-dnl
-dnl   GSSAPI/Kerberos library detection.
-dnl
-dnl   Copyright 2006 by Easy Software Products.
-dnl
-dnl   This file contains Kerberos support code, copyright 2006 by
-dnl   Jelmer Vernooij.
-dnl
-dnl   These coded instructions, statements, and computer programs are the
-dnl   property of Easy Software Products and are protected by Federal
-dnl   copyright law.  Distribution and use rights are outlined in the file
-dnl   "LICENSE.txt" which should have been included with this file.  If this
-dnl   file is missing or damaged please contact Easy Software Products
-dnl   at:
-dnl
-dnl       Attn: CUPS Licensing Information
-dnl       Easy Software Products
-dnl       44141 Airport View Drive, Suite 204
-dnl       Hollywood, Maryland 20636 USA
-dnl
-dnl       Voice: (301) 373-9600
-dnl       EMail: cups-info@cups.org
-dnl         WWW: http://www.cups.org
-dnl
-
-AC_ARG_ENABLE(gssapi, [  --enable-gssapi         turn on GSSAPI support, default=yes])
-
-LIBGSSAPI=""
-
-if test x$enable_gssapi != xno; then
-       AC_PATH_PROG(KRB5CONFIG, krb5-config)
-       if test "x$KRB5CONFIG" != x; then
-               CFLAGS="`$KRB5CONFIG --cflags gssapi` $CFLAGS"          
-               CPPFLAGS="`$KRB5CONFIG --cflags gssapi` $CPPFLAGS"              
-               LIBGSSAPI="`$KRB5CONFIG --libs gssapi`"
-               AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
-       else
-               # Solaris provides its own GSSAPI implementation...
-               AC_CHECK_LIB(gss, gss_display_status,
-                       AC_DEFINE(HAVE_GSSAPI, 1, [Whether GSSAPI is available])
-                       LIBGSSAPI="-lgss")
-       fi
-
-       if test "x$LIBGSSAPI" != x; then
-               AC_CHECK_HEADER(krb5.h, AC_DEFINE(HAVE_KRB5_H))
-               AC_CHECK_HEADER(gssapi.h, AC_DEFINE(HAVE_GSSAPI_H))
-               AC_CHECK_HEADER(gssapi/gssapi.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_H))
-               AC_CHECK_HEADER(gssapi/gssapi_generic.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_GENERIC_H))
-               AC_CHECK_HEADER(gssapi/gssapi_krb5.h, AC_DEFINE(HAVE_GSSAPI_GSSAPI_KRB5_H))
-
-               SAVELIBS="$LIBS"
-               LIBS="$LIBS $LIBGSSAPI"
-               AC_CHECK_FUNC(gsskrb5_register_acceptor_identity, 
-                             AC_DEFINE(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY))
                LIBS="$SAVELIBS"
+
+               AC_MSG_CHECKING(for Heimdal Kerberos)
                AC_TRY_COMPILE([ #include <krb5.h> ],
                               [ char *tmp = heimdal_version; ],
-                              AC_DEFINE(HAVE_HEIMDAL))
+                              AC_DEFINE(HAVE_HEIMDAL)
+                              AC_MSG_RESULT(yes),
+                              AC_MSG_RESULT(no))
        fi
 fi
 
 AC_SUBST(LIBGSSAPI)
 
 dnl
-dnl End of "$Id: cups-gssapi.m4 5916 2006-08-30 20:46:47Z mike $".
+dnl End of "$Id$".
 dnl
index 13844819431e35e033f499f5409ed8c05597d81b..39ada0d278e45dd1443154a83ab4d45d5be5a503 100644 (file)
 #undef HAVE_GSSAPI_GSSAPI_GENERIC_H
 #undef HAVE_GSSAPI_GSSAPI_KRB5_H
 #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
+#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
 #undef HAVE_KRB5_H
 #undef HAVE_HEIMDAL
 
index e83dd03e4fde62c51aff5cf22c18887038114b2d..3e44b7d46805c88102a6416843e0c326a531a1f6 100644 (file)
@@ -68,6 +68,9 @@
 #    ifdef HAVE_GSSAPI_H
 #      include <gssapi.h>
 #    endif /* HAVE_GSSAPI_H */
+#    ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
+#      define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
+#    endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
 #  endif /* HAVE_GSSAPI */
 
 #  if defined(__sgi) || (defined(__APPLE__) && !defined(_SOCKLEN_T))