1 ## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
3 ## Squid software is distributed under GPLv2+ license and includes
4 ## contributions from numerous individuals and organizations.
5 ## Please see the COPYING and CONTRIBUTORS files for details.
8 # This file is supposed to run all the tests required to identify which
9 # configured modules are able to be built in this environment
11 # TODO: de-duplicate $enable_external_acl_helpers list containing double entries.
13 #define list of modules to build
14 auto_ext_acl_modules=no
15 if test "x${enable_external_acl_helpers:=yes}" = "xyes" ;then
16 SQUID_LOOK_FOR_MODULES([$srcdir/src/acl/external],[enable_external_acl_helpers])
17 auto_ext_acl_modules=yes
19 if test "x$enable_external_acl_helpers" = "xnone" ; then
20 enable_external_acl_helpers=""
22 EXTERNAL_ACL_HELPERS=""
23 enable_external_acl_helpers="`echo $enable_external_acl_helpers| sed -e 's/,/ /g;s/ */ /g'`"
24 if test "x$enable_external_acl_helpers" != "xno" ; then
25 for helper in $enable_external_acl_helpers ; do
26 dir="$srcdir/src/acl/external/$helper"
28 # modules converted to autoconf macros already
29 # NP: we only need this list because m4_include() does not accept variables
30 if test "x$helper" = "xAD_group" ; then
31 m4_include([src/acl/external/AD_group/required.m4])
33 elif test "x$helper" = "xLDAP_group" ; then
34 m4_include([src/acl/external/LDAP_group/required.m4])
36 elif test "x$helper" = "xLM_group" ; then
37 m4_include([src/acl/external/LM_group/required.m4])
39 elif test "x$helper" = "xdelayer" ; then
40 m4_include([src/acl/external/delayer/required.m4])
42 elif test "x$helper" = "xSQL_session" ; then
43 m4_include([src/acl/external/SQL_session/required.m4])
45 elif test "x$helper" = "xeDirectory_userip" ; then
46 m4_include([src/acl/external/eDirectory_userip/required.m4])
48 elif test "x$helper" = "xfile_userip" ; then
49 m4_include([src/acl/external/file_userip/required.m4])
51 elif test "x$helper" = "xkerberos_ldap_group" ; then
52 m4_include([src/acl/external/kerberos_ldap_group/required.m4])
54 elif test "x$helper" = "xkerberos_sid_group" ; then
55 m4_include([src/acl/external/kerberos_sid_group/required.m4])
57 elif test "x$helper" = "xsession" ; then
58 m4_include([src/acl/external/session/required.m4])
60 elif test "x$helper" = "xtime_quota" ; then
61 m4_include([src/acl/external/time_quota/required.m4])
63 elif test "x$helper" = "xunix_group" ; then
64 m4_include([src/acl/external/unix_group/required.m4])
66 elif test "x$helper" = "xwbinfo_group" ; then
67 m4_include([src/acl/external/wbinfo_group/required.m4])
69 # modules not yet converted to autoconf macros (or third party drop-in's)
70 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
71 BUILD_HELPER="$helper"
74 if test -d "$srcdir/src/acl/external/$helper"; then
75 if test "$BUILD_HELPER" != "$helper"; then
76 if test "x$auto_ext_acl_modules" = "xyes"; then
77 AC_MSG_NOTICE([external acl helper $helper ... found but cannot be built])
79 AC_MSG_ERROR([external acl helper $helper ... found but cannot be built])
82 EXTERNAL_ACL_HELPERS="$EXTERNAL_ACL_HELPERS $BUILD_HELPER"
85 AC_MSG_ERROR([external acl helper $helper ... not found])
89 AC_MSG_NOTICE([External acl helpers to be built: $EXTERNAL_ACL_HELPERS])
90 AC_SUBST(EXTERNAL_ACL_HELPERS)