From: Amos Jeffries Date: Sun, 4 Jan 2026 02:21:53 +0000 (+0000) Subject: Polish SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE macro (#2316) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e34a40473c1bc6accad749c50c914c9af66bc59;p=thirdparty%2Fsquid.git Polish SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE macro (#2316) * trivial whitespace cleanup * reposition for alphabetical naming order * move SQUID_DEFINE_BOOL inside the check macro --- diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 index 156c6a2598..a09cabd645 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 @@ -5,6 +5,27 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## +dnl check whether the Kerberos context has a memory cache +AC_DEFUN([SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE],[ + AC_REQUIRE([SQUID_STATE_SAVE]) + AC_REQUIRE([SQUID_STATE_ROLLBACK]) + AC_REQUIRE([SQUID_DEFINE_BOOL]) + AC_CACHE_CHECK([for Kerberos context memory cache],squid_cv_krb5_memory_cache,[ + SQUID_STATE_SAVE(squid_krb5_test) + CPPFLAGS="-I${srcdir:-.} $CPPFLAGS" + AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include "compat/krb5.h"]],[[ + krb5_context c; + krb5_ccache cc; + krb5_init_context(&c); + return krb5_cc_resolve(c, "MEMORY:test_cache", &cc); + ]]) + ],[squid_cv_krb5_memory_cache=yes],[squid_cv_krb5_memory_cache=no],[:]) + SQUID_STATE_ROLLBACK(squid_krb5_test) + ]) + SQUID_DEFINE_BOOL(HAVE_KRB5_MEMORY_CACHE,$squid_cv_krb5_memory_cache,[kerberos has MEMORY: cache support]) +]) dnl SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE + AC_DEFUN([SQUID_CHECK_SOLARIS_KRB5],[ # no pkg-config for solaris native Kerberos AS_IF([test "$cross_compiling" = "no" -a "x$with_mit_krb5" != "xyes" -a "x$with_mit_krb5" != "xno"],[ @@ -42,29 +63,6 @@ AC_DEFUN([SQUID_CHECK_SOLARIS_KRB5],[ ]) ]) -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],[ - AC_CACHE_CHECK([for memory cache], squid_cv_memory_cache, [ - SQUID_STATE_SAVE(squid_krb5_test) - CPPFLAGS="-I${srcdir:-.} $CPPFLAGS" - AC_RUN_IFELSE([ - AC_LANG_SOURCE([[ -#include "compat/krb5.h" -int main(int argc, char *argv[]) -{ - krb5_context context; - krb5_ccache cc; - - krb5_init_context(&context); - return krb5_cc_resolve(context, "MEMORY:test_cache", &cc); -} - ]]) - ], [ squid_cv_memory_cache=yes ], [ squid_cv_memory_cache=no ], [:]) - SQUID_STATE_ROLLBACK(squid_krb5_test) - ]) -]) - 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],[ @@ -275,9 +273,6 @@ AC_DEFUN([SQUID_CHECK_KRB5_FUNCS],[ SQUID_STATE_ROLLBACK(squid_krb5_test) SQUID_CHECK_KRB5_CONTEXT_MEMORY_CACHE - 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])