]>
Commit | Line | Data |
---|---|---|
77b1029d | 1 | ## Copyright (C) 1996-2020 The Squid Software Foundation and contributors |
5b95b903 AJ |
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 | ||
5a0c5a92 AJ |
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 | ||
9837567d | 11 | # TODO: de-duplicate $enable_auth_basic list containing double entries. |
5a0c5a92 AJ |
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 | |
c1bbd56c | 22 | auto_auth_basic_modules=no |
5a0c5a92 | 23 | if test "x$enable_auth_basic" = "xyes" ; then |
03901cf8 | 24 | SQUID_LOOK_FOR_MODULES([$srcdir/src/auth/basic],[enable_auth_basic]) |
c1bbd56c | 25 | auto_auth_basic_modules=yes |
5a0c5a92 AJ |
26 | fi |
27 | #handle the "none" special case | |
28 | if test "x$enable_auth_basic" = "xnone" ; then | |
29 | enable_auth_basic="" | |
30 | fi | |
31 | ||
32 | BASIC_AUTH_HELPERS="" | |
33 | #enable_auth_basic contains either "no" or the list of modules to be built | |
34 | enable_auth_basic="`echo $enable_auth_basic| sed -e 's/,/ /g;s/ */ /g'`" | |
35 | if test "x$enable_auth_basic" != "xno" ; then | |
36 | AUTH_MODULES="$AUTH_MODULES basic" | |
37 | AC_DEFINE([HAVE_AUTH_MODULE_BASIC],1,[Basic auth module is built]) | |
5eabe4b4 | 38 | for helper in $enable_auth_basic; do |
03901cf8 | 39 | dir="$srcdir/src/auth/basic/$helper" |
5a0c5a92 AJ |
40 | |
41 | # modules converted to autoconf macros already | |
42 | # NP: we only need this list because m4_include() does not accept variables | |
43 | if test "x$helper" = "xDB" ; then | |
03901cf8 | 44 | m4_include([src/auth/basic/DB/required.m4]) |
5a0c5a92 AJ |
45 | |
46 | elif test "x$helper" = "xLDAP" ; then | |
03901cf8 | 47 | m4_include([src/auth/basic/LDAP/required.m4]) |
5a0c5a92 | 48 | |
5a0c5a92 | 49 | elif test "x$helper" = "xNCSA" ; then |
03901cf8 | 50 | m4_include([src/auth/basic/NCSA/required.m4]) |
5a0c5a92 AJ |
51 | |
52 | elif test "x$helper" = "xNIS" ; then | |
03901cf8 | 53 | m4_include([src/auth/basic/NIS/required.m4]) |
5a0c5a92 | 54 | |
f6c0a802 | 55 | elif test "x$helper" = "xPAM" ; then |
03901cf8 | 56 | m4_include([src/auth/basic/PAM/required.m4]) |
f6c0a802 | 57 | |
5a0c5a92 | 58 | elif test "x$helper" = "xPOP3" ; then |
03901cf8 | 59 | m4_include([src/auth/basic/POP3/required.m4]) |
5a0c5a92 AJ |
60 | |
61 | elif test "x$helper" = "xRADIUS" ; then | |
03901cf8 | 62 | m4_include([src/auth/basic/RADIUS/required.m4]) |
5a0c5a92 AJ |
63 | |
64 | elif test "x$helper" = "xSASL" ; then | |
03901cf8 | 65 | m4_include([src/auth/basic/SASL/required.m4]) |
5a0c5a92 AJ |
66 | |
67 | elif test "x$helper" = "xSMB" ; then | |
03901cf8 | 68 | m4_include([src/auth/basic/SMB/required.m4]) |
5a0c5a92 | 69 | |
8f0e29d2 | 70 | elif test "x$helper" = "xSMB_LM" ; then |
03901cf8 | 71 | m4_include([src/auth/basic/SMB_LM/required.m4]) |
8f0e29d2 | 72 | |
5a0c5a92 | 73 | elif test "x$helper" = "xSSPI" ; then |
03901cf8 | 74 | m4_include([src/auth/basic/SSPI/required.m4]) |
5a0c5a92 AJ |
75 | |
76 | elif test "x$helper" = "xfake" ; then | |
03901cf8 | 77 | m4_include([src/auth/basic/fake/required.m4]) |
5a0c5a92 AJ |
78 | |
79 | elif test "x$helper" = "xgetpwnam" ; then | |
03901cf8 | 80 | m4_include([src/auth/basic/getpwnam/required.m4]) |
5a0c5a92 AJ |
81 | |
82 | # modules not yet converted to autoconf macros (or third party drop-in's) | |
83 | elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then | |
84 | BUILD_HELPER="$helper" | |
85 | fi | |
86 | ||
03901cf8 | 87 | if test -d "$srcdir/src/auth/basic/$helper"; then |
5a0c5a92 | 88 | if test "$BUILD_HELPER" != "$helper"; then |
c1bbd56c AJ |
89 | if test "x$auto_auth_basic_modules" = "xyes"; then |
90 | AC_MSG_NOTICE([Basic auth helper $helper ... found but cannot be built]) | |
91 | else | |
92 | AC_MSG_ERROR([Basic auth helper $helper ... found but cannot be built]) | |
93 | fi | |
5a0c5a92 AJ |
94 | else |
95 | BASIC_AUTH_HELPERS="$BASIC_AUTH_HELPERS $BUILD_HELPER" | |
96 | fi | |
97 | else | |
5eabe4b4 | 98 | AC_MSG_ERROR([Basic auth helper $helper ... not found]) |
5a0c5a92 AJ |
99 | fi |
100 | done | |
101 | fi | |
102 | ||
103 | AC_MSG_NOTICE([Basic auth helpers to be built: $BASIC_AUTH_HELPERS]) | |
104 | AM_CONDITIONAL(ENABLE_AUTH_BASIC, test "x$enable_auth_basic" != "xno") | |
105 | AC_SUBST(BASIC_AUTH_HELPERS) |