]> git.ipfire.org Git - thirdparty/squid.git/blame - src/auth/digest/helpers.m4
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / auth / digest / helpers.m4
CommitLineData
5b74111a 1## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
ca02e0ec
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
5eabe4b4
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
11# FIXME: de-duplicate $enable_auth_digest list containing double entries.
12
13#not specified. Inherit global
14if test "x$enable_auth_digest" = "x"; then
15 enable_auth_digest=$enable_auth
16fi
17#conflicts with global
18if test "x$enable_auth_digest" != "xno" -a "x$enable_auth" = "xno" ; then
19 AC_MSG_ERROR([Digest auth requested but auth disabled])
20fi
21#define list of modules to build
c1bbd56c 22auto_auth_digest_modules=no
5eabe4b4 23if test "x$enable_auth_digest" = "xyes" ; then
d4d7f6dd 24 SQUID_LOOK_FOR_MODULES([$srcdir/src/auth/digest],[enable_auth_digest])
c1bbd56c 25 auto_auth_digest_modules=yes
5eabe4b4
AJ
26fi
27#handle the "none" special case
28if test "x$enable_auth_digest" = "xnone" ; then
29 enable_auth_digest=""
30fi
31
32DIGEST_AUTH_HELPERS=""
33enable_auth_digest="`echo $enable_auth_digest| sed -e 's/,/ /g;s/ */ /g'`"
34if test "x$enable_auth_digest" != "xno" ; then
35 AUTH_MODULES="$AUTH_MODULES digest"
36 AC_DEFINE([HAVE_AUTH_MODULE_DIGEST],1,[Digest auth module is built])
37 for helper in $enable_auth_digest; do
d4d7f6dd 38 dir="$srcdir/src/auth/digest/$helper"
5eabe4b4
AJ
39
40 # modules converted to autoconf macros already
41 # NP: we only need this list because m4_include() does not accept variables
d4d7f6dd
AJ
42 if test "x$helper" = "xeDirectory" ; then
43 m4_include([src/auth/digest/eDirectory/required.m4])
5eabe4b4
AJ
44
45 elif test "x$helper" = "xfile" ; then
d4d7f6dd
AJ
46 m4_include([src/auth/digest/file/required.m4])
47
48 elif test "x$helper" = "xLDAP" ; then
49 m4_include([src/auth/digest/LDAP/required.m4])
5eabe4b4
AJ
50
51 # modules not yet converted to autoconf macros (or third party drop-in's)
52 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
53 BUILD_HELPER="$helper"
54 fi
55
d4d7f6dd 56 if test -d "$srcdir/src/auth/digest/$helper"; then
5eabe4b4 57 if test "$BUILD_HELPER" != "$helper"; then
c1bbd56c
AJ
58 if test "x$auto_auth_digest_modules" = "xyes"; then
59 AC_MSG_NOTICE([Digest auth helper $helper ... found but cannot be built])
60 else
61 AC_MSG_ERROR([Digest auth helper $helper ... found but cannot be built])
62 fi
5eabe4b4
AJ
63 else
64 DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS $BUILD_HELPER"
65 fi
66 else
67 AC_MSG_ERROR([Digest auth helper $helper ... not found])
68 fi
69 done
70fi
71AC_MSG_NOTICE([Digest auth helpers to be built: $DIGEST_AUTH_HELPERS])
72AM_CONDITIONAL(ENABLE_AUTH_DIGEST, test "x$enable_auth_digest" != "xno")
73AC_SUBST(DIGEST_AUTH_HELPERS)