]> git.ipfire.org Git - thirdparty/squid.git/blame - helpers/digest_auth/modules.m4
Boilerplate: update copyright blurbs on Squid helpers
[thirdparty/squid.git] / helpers / digest_auth / modules.m4
CommitLineData
ca02e0ec
AJ
1## Copyright (C) 1996-2014 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
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
22if test "x$enable_auth_digest" = "xyes" ; then
23 SQUID_LOOK_FOR_MODULES([$srcdir/helpers/digest_auth],[enable_auth_digest])
24fi
25#handle the "none" special case
26if test "x$enable_auth_digest" = "xnone" ; then
27 enable_auth_digest=""
28fi
29
30DIGEST_AUTH_HELPERS=""
31enable_auth_digest="`echo $enable_auth_digest| sed -e 's/,/ /g;s/ */ /g'`"
32if test "x$enable_auth_digest" != "xno" ; then
33 AUTH_MODULES="$AUTH_MODULES digest"
34 AC_DEFINE([HAVE_AUTH_MODULE_DIGEST],1,[Digest auth module is built])
35 for helper in $enable_auth_digest; do
36 dir="$srcdir/helpers/digest_auth/$helper"
37
38 # modules converted to autoconf macros already
39 # NP: we only need this list because m4_include() does not accept variables
40 if test "x$helper" = "xLDAP" ; then
41 m4_include([helpers/digest_auth/LDAP/required.m4])
42
43 elif test "x$helper" = "xeDirectory" ; then
44 m4_include([helpers/digest_auth/eDirectory/required.m4])
45
46 elif test "x$helper" = "xfile" ; then
47 m4_include([helpers/digest_auth/file/required.m4])
48
49 # modules not yet converted to autoconf macros (or third party drop-in's)
50 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
51 BUILD_HELPER="$helper"
52 fi
53
54 if test -d "$srcdir/helpers/digest_auth/$helper"; then
55 if test "$BUILD_HELPER" != "$helper"; then
56 AC_MSG_NOTICE([Digest auth helper $helper ... found but cannot be built])
57 else
58 DIGEST_AUTH_HELPERS="$DIGEST_AUTH_HELPERS $BUILD_HELPER"
59 fi
60 else
61 AC_MSG_ERROR([Digest auth helper $helper ... not found])
62 fi
63 done
64fi
65AC_MSG_NOTICE([Digest auth helpers to be built: $DIGEST_AUTH_HELPERS])
66AM_CONDITIONAL(ENABLE_AUTH_DIGEST, test "x$enable_auth_digest" != "xno")
67AC_SUBST(DIGEST_AUTH_HELPERS)