]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/external/helpers.m4
Maintenance: Remove FIXME and \todo labels (#647)
[thirdparty/squid.git] / src / acl / external / helpers.m4
1 ## Copyright (C) 1996-2020 The Squid Software Foundation and contributors
2 ##
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.
6 ##
7
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
10
11 # TODO: de-duplicate $enable_external_acl_helpers list containing double entries.
12
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
18 fi
19 if test "x$enable_external_acl_helpers" = "xnone" ; then
20 enable_external_acl_helpers=""
21 fi
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"
27
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])
32
33 elif test "x$helper" = "xLDAP_group" ; then
34 m4_include([src/acl/external/LDAP_group/required.m4])
35
36 elif test "x$helper" = "xLM_group" ; then
37 m4_include([src/acl/external/LM_group/required.m4])
38
39 elif test "x$helper" = "xdelayer" ; then
40 m4_include([src/acl/external/delayer/required.m4])
41
42 elif test "x$helper" = "xSQL_session" ; then
43 m4_include([src/acl/external/SQL_session/required.m4])
44
45 elif test "x$helper" = "xeDirectory_userip" ; then
46 m4_include([src/acl/external/eDirectory_userip/required.m4])
47
48 elif test "x$helper" = "xfile_userip" ; then
49 m4_include([src/acl/external/file_userip/required.m4])
50
51 elif test "x$helper" = "xkerberos_ldap_group" ; then
52 m4_include([src/acl/external/kerberos_ldap_group/required.m4])
53
54 elif test "x$helper" = "xkerberos_sid_group" ; then
55 m4_include([src/acl/external/kerberos_sid_group/required.m4])
56
57 elif test "x$helper" = "xsession" ; then
58 m4_include([src/acl/external/session/required.m4])
59
60 elif test "x$helper" = "xtime_quota" ; then
61 m4_include([src/acl/external/time_quota/required.m4])
62
63 elif test "x$helper" = "xunix_group" ; then
64 m4_include([src/acl/external/unix_group/required.m4])
65
66 elif test "x$helper" = "xwbinfo_group" ; then
67 m4_include([src/acl/external/wbinfo_group/required.m4])
68
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"
72 fi
73
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])
78 else
79 AC_MSG_ERROR([external acl helper $helper ... found but cannot be built])
80 fi
81 else
82 EXTERNAL_ACL_HELPERS="$EXTERNAL_ACL_HELPERS $BUILD_HELPER"
83 fi
84 else
85 AC_MSG_ERROR([external acl helper $helper ... not found])
86 fi
87 done
88 fi
89 AC_MSG_NOTICE([External acl helpers to be built: $EXTERNAL_ACL_HELPERS])
90 AC_SUBST(EXTERNAL_ACL_HELPERS)