]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - acinclude/krb5.m4
SourceFormat Enforcement
[thirdparty/squid.git] / acinclude / krb5.m4
index 5aa8a99d54423c3000a9cadacca05b0efd084dd7..8f15b9a2152d9d2cae600d5aaba41e5d2c13c419 100644 (file)
@@ -1,4 +1,4 @@
-## Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+## Copyright (C) 1996-2015 The Squid Software Foundation and contributors
 ##
 ## Squid software is distributed under GPLv2+ license and includes
 ## contributions from numerous individuals and organizations.
@@ -114,6 +114,33 @@ int main(int argc, char *argv[])
   ])
 ])
 
+dnl check whether the kerberos context has a memory keytab. Sets
+dnl squid_cv_memory_keytab if that's the case.
+AC_DEFUN([SQUID_CHECK_KRB5_CONTEXT_MEMORY_KEYTAB],[
+  AC_CACHE_CHECK([for memory keytab], squid_cv_memory_keytab, [
+    AC_RUN_IFELSE([
+      AC_LANG_SOURCE([[
+#if HAVE_BROKEN_SOLARIS_KRB5_H
+#if defined(__cplusplus)
+#define KRB5INT_BEGIN_DECLS     extern "C" {
+#define KRB5INT_END_DECLS
+KRB5INT_BEGIN_DECLS
+#endif
+#endif
+#include <krb5.h>
+int main(int argc, char *argv[])
+{
+    krb5_context context;
+    krb5_keytab kt;
+
+    krb5_init_context(&context);
+    return krb5_kt_resolve(context, "MEMORY:test_keytab", &kt);
+}
+      ]])
+    ], [ squid_cv_memory_keytab=yes ], [ squid_cv_memory_keytab=no ], [:])
+  ])
+])
+
 
 dnl checks that gssapi is ok, and sets squid_cv_working_gssapi accordingly
 AC_DEFUN([SQUID_CHECK_WORKING_GSSAPI], [
@@ -331,6 +358,10 @@ AC_DEFUN([SQUID_CHECK_KRB5_FUNCS],[
   SQUID_DEFINE_BOOL(HAVE_KRB5_MEMORY_CACHE,$squid_cv_memory_cache,
        [Define if kerberos has MEMORY: cache support])
 
+  SQUID_CHECK_KRB5_CONTEXT_MEMORY_KEYTAB
+  SQUID_DEFINE_BOOL(HAVE_KRB5_MEMORY_KEYTAB,$squid_cv_memory_keytab,
+       [Define if kerberos has MEMORY: keytab support])
+
   SQUID_CHECK_WORKING_GSSAPI
   SQUID_DEFINE_BOOL(HAVE_GSSAPI,$squid_cv_working_gssapi,[GSSAPI support])