])
])
-AC_DEFUN([SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H], [
- AC_CACHE_CHECK([for broken Heimdal krb5.h],squid_cv_broken_heimdal_krb5_h, [
- SQUID_STATE_SAVE(squid_krb5_heimdal_test)
- CPPFLAGS="-I${srcdir:-.} $CPPFLAGS"
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
-#include <krb5.h>
-int
-main(void)
-{
- krb5_context context;
- krb5_init_context(&context);
- return 0;
-}
-]])], [ squid_cv_broken_heimdal_krb5_h=no ], [
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
-#define HAVE_BROKEN_HEIMDAL_KRB5_H 1
-#include "compat/krb5.h"
-int
-main(void)
-{
- krb5_context context;
- krb5_init_context(&context);
- return 0;
-}
-]])], [ squid_cv_broken_heimdal_krb5_h=yes ], [ squid_cv_broken_heimdal_krb5_h=no ])
- ])
- SQUID_STATE_ROLLBACK(squid_krb5_heimdal_test)
- ])
- SQUID_DEFINE_BOOL(HAVE_BROKEN_HEIMDAL_KRB5_H,$squid_cv_broken_heimdal_krb5_h,[Heimdal krb5.h is broken for C++])
-]) dnl SQUID_CHECK_KRB5_HEIMDAL_BROKEN_KRB5_H
-
dnl check whether the kerberos context has a memory cache. Sets
dnl squid_cv_memory_cache if that's the case.
AC_DEFUN([SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE],[
#define SQUID_COMPAT_KRB5_H
/*
- * The Kerberos library krb5.h header file has various major
- * bugs in some implementations:
+ * The Kerberos library has various major bugs.
*
* - MacOS marks as deprecated the POSIX compatible APIs.
* Apparently to encourage code to use their internal APIs.
*
- * - Heimdal may lack the extern "C" syntax for building in C++
- *
* This file exists to fix those issues the best we can and to
* ensure the logic is identical in Squid code, Squid helpers,
* and autoconf tests. See acinclude/krb5.h for the latter.
# if USE_APPLE_KRB5
# define KERBEROS_APPLE_DEPRECATED(x)
# endif
-# if HAVE_BROKEN_HEIMDAL_KRB5_H && defined(__cplusplus)
-extern "C" {
-# include <krb5.h>
-}
-# else
-# include <krb5.h>
-# endif
+#include <krb5.h>
#endif /* HAVE_KRB5_H */
#endif /* SQUID_COMPAT_KRB5_H */