From: Amos Jeffries Date: Tue, 13 Aug 2024 13:52:39 +0000 (+0000) Subject: ext_ad_group_acl: fix dependency detection (#1882) X-Git-Tag: SQUID_7_0_1~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8a3f05078714f3ed8c3807fe33b1409ef43fe1e;p=thirdparty%2Fsquid.git ext_ad_group_acl: fix dependency detection (#1882) .. and compliance with Squid coding style. --- diff --git a/src/acl/external/AD_group/ext_ad_group_acl.cc b/src/acl/external/AD_group/ext_ad_group_acl.cc index ce9c62b391..3d67144531 100644 --- a/src/acl/external/AD_group/ext_ad_group_acl.cc +++ b/src/acl/external/AD_group/ext_ad_group_acl.cc @@ -78,19 +78,37 @@ int _wcsicmp(const wchar_t *, const wchar_t *); #include #include #include + #if HAVE_GETOPT_H #include #endif -#include +#if HAVE_OBJBASE_H #include +#endif +#if HAVE_INITGUID_H #include +#endif +#if HAVE_ADSIID_H #include +#endif +#if HAVE_IADS_H #include +#endif +#if HAVE_ADSHLP_H #include +#endif +#if HAVE_ADSERR_H #include +#endif +#if HAVE_LM_H #include +#endif +#if HAVE_DSROLE_H #include +#endif +#if HAVE_SDDL_H #include +#endif enum ADSI_PATH { LDAP_MODE, diff --git a/src/acl/external/AD_group/required.m4 b/src/acl/external/AD_group/required.m4 index ca80494054..319060c056 100755 --- a/src/acl/external/AD_group/required.m4 +++ b/src/acl/external/AD_group/required.m4 @@ -5,11 +5,41 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -for hdr in w32api/dsrole.h dsrole.h; do +AC_CHECK_HEADERS([dsrole.h],[ + # required API feature AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[#include <$hdr>]], [[ + AC_LANG_PROGRAM([[ +# if HAVE_WINDOWS_H +# include +# endif +# if HAVE_DSROLE_H +# include +# endif + ]], [[ PDSROLE_PRIMARY_DOMAIN_INFO_BASIC pDSRoleInfo; DWORD ret = DsRoleGetPrimaryDomainInformation(NULL, DsRolePrimaryDomainInfoBasic, (PBYTE *) & pDSRoleInfo); ]]) - ],[BUILD_HELPER="AD_group"],[]) -done + ],[BUILD_HELPER="AD_group"],[:]) + # required headers + AC_CHECK_HEADERS([ \ + objbase.h \ + initguid.h \ + adsiid.h \ + iads.h \ + adshlp.h \ + adserr.h \ + lm.h \ + sddl.h + ],[:],[BUILD_HELPER=""],[ +# if HAVE_WINDOWS_H +# include +# endif +# if HAVE_IADS_H +# include +# endif + ]) +],,[ +# if HAVE_WINDOWS_H +# include +# endif +])