From: Amos Jeffries Date: Fri, 23 Feb 2024 17:53:14 +0000 (+0000) Subject: Rename --with-gnugss to --with-gss (#1688) X-Git-Tag: SQUID_7_0_1~197 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=457fd081b9213dfc62e23ca0d5c8c1cf5b3badcc;p=thirdparty%2Fsquid.git Rename --with-gnugss to --with-gss (#1688) Updating the library detection to use pkg-config and bringing relevant macros up to current style. --- diff --git a/acinclude/krb5.m4 b/acinclude/krb5.m4 index 2c4e3403cd..0215f47229 100644 --- a/acinclude/krb5.m4 +++ b/acinclude/krb5.m4 @@ -131,17 +131,9 @@ dnl checks that gssapi is ok, and sets squid_cv_working_gssapi accordingly AC_DEFUN([SQUID_CHECK_WORKING_GSSAPI], [ AC_CACHE_CHECK([for working gssapi], squid_cv_working_gssapi, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#if USE_HEIMDAL_KRB5 -#if HAVE_GSSAPI_GSSAPI_H -#include -#elif HAVE_GSSAPI_H -#include -#endif -#elif USE_GNUGSS #if HAVE_GSS_H #include #endif -#else #if USE_APPLE_KRB5 #define GSSKRB_APPLE_DEPRECATED(x) #endif @@ -156,7 +148,6 @@ AC_DEFUN([SQUID_CHECK_WORKING_GSSAPI], [ #if HAVE_GSSAPI_GSSAPI_GENERIC_H #include #endif -#endif int main(void) { @@ -177,17 +168,9 @@ dnl check for a working spnego, and set squid_cv_have_spnego AC_DEFUN([SQUID_CHECK_SPNEGO_SUPPORT], [ AC_CACHE_CHECK([for spnego support], squid_cv_have_spnego, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#if USE_HEIMDAL_KRB5 -#if HAVE_GSSAPI_GSSAPI_H -#include -#elif HAVE_GSSAPI_H -#include -#endif -#elif USE_GNUGSS #if HAVE_GSS_H #include #endif -#else #if USE_APPLE_KRB5 #define GSSKRB_APPLE_DEPRECATED(x) #endif @@ -202,7 +185,6 @@ AC_DEFUN([SQUID_CHECK_SPNEGO_SUPPORT], [ #if HAVE_GSSAPI_GSSAPI_GENERIC_H #include #endif -#endif #include int main(int argc, char *argv[]) { OM_uint32 major_status,minor_status; diff --git a/configure.ac b/configure.ac index 9250d73dc0..e4569726e5 100644 --- a/configure.ac +++ b/configure.ac @@ -1544,56 +1544,24 @@ AS_IF([test "x$with_heimdal_krb5" != "xno" -a "x$KRB5LIBS" = "x"],[ SQUID_STATE_ROLLBACK([squid_krb5_save]) ]) -dnl User may specify GNU gss is needed from a non-standard location -SQUID_AUTO_LIB(gnugss,[GNU gss],[LIB_KRB5]) -AH_TEMPLATE(USE_GNUGSS,[GNU gss support is available]) -AS_IF([test "x$with_gnugss" != "xno" -a "x$KRB5LIBS" = "x"],[ - CXXFLAGS="$LIB_KRB5_CFLAGS $CXXFLAGS" - krb5confpath= - SQUID_STATE_SAVE([squid_krb5_save]) - LIBS="$LIBS $LIB_KRB5_PATH" - - # auto-detect using pkg-config - PKG_CHECK_MODULES([LIB_KRB5],[gss],,[ - ## For some OS pkg-config is broken or unavailable. - ## Detect libraries the hard way. - - AC_MSG_NOTICE([Try to find Kerberos libraries in given path]) - AC_CHECK_LIB(gss, [main], [LIB_KRB5_LIBS="-lgss $LIB_KRB5_LIBS"],[ - AC_MSG_WARN([library 'com_err' is required for GNU Kerberos]) - ]) - ]) - - AS_IF([test "x$LIB_KRB5_LIBS" != "x"],[ - KRB5LIBS="$LIB_KRB5_PATH $LIB_KRB5_LIBS $KRB5LIBS" - KRB5INCS="$LIB_KRB5_CFLAGS" - AC_DEFINE(USE_GNUGSS,1,[GNU Kerberos support is available]) - KRB5_FLAVOUR="GNU GSS" - - # check for other specific broken implementations - CXXFLAGS="$CXXFLAGS $KRB5INCS" - LIBS="$LIBS $KRB5LIBS" - - AC_MSG_NOTICE([Try to find Kerbeors headers in given path]) - AC_CHECK_HEADERS(gss.h) - - SQUID_CHECK_WORKING_GSSAPI - SQUID_DEFINE_BOOL(HAVE_GSSAPI,$squid_cv_working_gssapi,[GSSAPI support]) - - SQUID_CHECK_SPNEGO_SUPPORT - SQUID_DEFINE_BOOL(HAVE_SPNEGO,$squid_cv_have_spnego,[SPNEGO support]) - - SQUID_CHECK_WORKING_KRB5 - SQUID_DEFINE_BOOL(HAVE_KRB5,$squid_cv_working_krb5,[KRB5 support]) - ]) +# Kerberos support libraries: GNU GSS +SQUID_AUTO_LIB(gss,[GNU gss],[LIBGSS]) +SQUID_CHECK_LIB_WORKS(gss,[ AS_IF([test "x$KRB5LIBS" = "x"],[ - AS_IF([test "x$with_gnugss" = "xyes"],[ - AC_MSG_ERROR([Required GNU GSS Kerberos library not found]) - ],[ - AC_MSG_WARN([GNU GSS Kerberos library not found]) - ]) + SQUID_STATE_SAVE(squid_gss_save) + PKG_CHECK_MODULES([LIBGSS],[gss],[ + CPPFLAGS="$LIBGSS_CFLAGS $CPPFLAGS" + AC_CHECK_HEADERS(gss.h) + LIBS="$LIBGSS_PATH $LIBS" + SQUID_CHECK_WORKING_GSSAPI + SQUID_DEFINE_BOOL(HAVE_GSSAPI,$squid_cv_working_gssapi,[GSSAPI support]) + SQUID_CHECK_SPNEGO_SUPPORT + SQUID_DEFINE_BOOL(HAVE_SPNEGO,$squid_cv_have_spnego,[SPNEGO support]) + SQUID_CHECK_WORKING_KRB5 + SQUID_DEFINE_BOOL(HAVE_KRB5,$squid_cv_working_krb5,[KRB5 support]) + ],[:]) + SQUID_STATE_ROLLBACK(squid_gss_save) ]) - SQUID_STATE_ROLLBACK([squid_krb5_save]) ]) AS_IF([test "x$KRB5LIBS" != "x"],[with_krb5=yes]) diff --git a/doc/release-notes/release-7.sgml.in b/doc/release-notes/release-7.sgml.in index a130f54417..a839fc679d 100644 --- a/doc/release-notes/release-7.sgml.in +++ b/doc/release-notes/release-7.sgml.in @@ -188,6 +188,9 @@ This section gives an account of those changes in three categories: New options