]> git.ipfire.org Git - thirdparty/squid.git/blob - helpers/basic_auth/modules.m4
MemBuf implements Packable interface
[thirdparty/squid.git] / helpers / basic_auth / modules.m4
1 ## Copyright (C) 1996-2015 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 # FIXME: de-duplicate $enable_auth_basic list containing double entries.
12
13 #not specified. Inherit global
14 if test "x$enable_auth_basic" = "x"; then
15 enable_auth_basic=$enable_auth
16 fi
17 #conflicts with global
18 if test "x$enable_auth_basic" != "xno" -a "x$enable_auth" = "xno" ; then
19 AC_MSG_ERROR([Basic auth requested but auth disabled])
20 fi
21 #define list of modules to build
22 if test "x$enable_auth_basic" = "xyes" ; then
23 SQUID_LOOK_FOR_MODULES([$srcdir/helpers/basic_auth],[enable_auth_basic])
24 fi
25 #handle the "none" special case
26 if test "x$enable_auth_basic" = "xnone" ; then
27 enable_auth_basic=""
28 fi
29
30 BASIC_AUTH_HELPERS=""
31 #enable_auth_basic contains either "no" or the list of modules to be built
32 enable_auth_basic="`echo $enable_auth_basic| sed -e 's/,/ /g;s/ */ /g'`"
33 if test "x$enable_auth_basic" != "xno" ; then
34 AUTH_MODULES="$AUTH_MODULES basic"
35 AC_DEFINE([HAVE_AUTH_MODULE_BASIC],1,[Basic auth module is built])
36 for helper in $enable_auth_basic; do
37 dir="$srcdir/helpers/basic_auth/$helper"
38
39 # modules converted to autoconf macros already
40 # NP: we only need this list because m4_include() does not accept variables
41 if test "x$helper" = "xDB" ; then
42 m4_include([helpers/basic_auth/DB/required.m4])
43
44 elif test "x$helper" = "xLDAP" ; then
45 m4_include([helpers/basic_auth/LDAP/required.m4])
46
47 elif test "x$helper" = "xNCSA" ; then
48 m4_include([helpers/basic_auth/NCSA/required.m4])
49
50 elif test "x$helper" = "xNIS" ; then
51 m4_include([helpers/basic_auth/NIS/required.m4])
52
53 elif test "x$helper" = "xPAM" ; then
54 m4_include([helpers/basic_auth/PAM/required.m4])
55
56 elif test "x$helper" = "xPOP3" ; then
57 m4_include([helpers/basic_auth/POP3/required.m4])
58
59 elif test "x$helper" = "xRADIUS" ; then
60 m4_include([helpers/basic_auth/RADIUS/required.m4])
61
62 elif test "x$helper" = "xSASL" ; then
63 m4_include([helpers/basic_auth/SASL/required.m4])
64
65 elif test "x$helper" = "xSMB" ; then
66 m4_include([helpers/basic_auth/SMB/required.m4])
67
68 elif test "x$helper" = "xSMB_LM" ; then
69 m4_include([helpers/basic_auth/SMB_LM/required.m4])
70
71 elif test "x$helper" = "xSSPI" ; then
72 m4_include([helpers/basic_auth/SSPI/required.m4])
73
74 elif test "x$helper" = "xfake" ; then
75 m4_include([helpers/basic_auth/fake/required.m4])
76
77 elif test "x$helper" = "xgetpwnam" ; then
78 m4_include([helpers/basic_auth/getpwnam/required.m4])
79
80 # modules not yet converted to autoconf macros (or third party drop-in's)
81 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
82 BUILD_HELPER="$helper"
83 fi
84
85 if test -d "$srcdir/helpers/basic_auth/$helper"; then
86 if test "$BUILD_HELPER" != "$helper"; then
87 AC_MSG_NOTICE([Basic auth helper $helper ... found but cannot be built])
88 else
89 BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS $BUILD_HELPER"
90 fi
91 else
92 AC_MSG_ERROR([Basic auth helper $helper ... not found])
93 fi
94 done
95 fi
96
97 AC_MSG_NOTICE([Basic auth helpers to be built: $BASIC_AUTH_HELPERS])
98 AM_CONDITIONAL(ENABLE_AUTH_BASIC, test "x$enable_auth_basic" != "xno")
99 AC_SUBST(BASIC_AUTH_HELPERS)