]> git.ipfire.org Git - thirdparty/squid.git/blame - helpers/negotiate_auth/modules.m4
Boilerplate: update copyright blurbs for Squid tools
[thirdparty/squid.git] / helpers / negotiate_auth / modules.m4
CommitLineData
5eabe4b4
AJ
1# This file is supposed to run all the tests required to identify which
2# configured modules are able to be built in this environment
3
4# FIXME: de-duplicate $enable_auth_negotiate list containing double entries.
5
6#not specified. Inherit global
7if test "x$enable_auth_negotiate" = "x"; then
8 enable_auth_negotiate=$enable_auth
9fi
10#conflicts with global
11if test "x$enable_auth_negotiate" != "xno" -a "x$enable_auth" = "xno" ; then
12 AC_MSG_ERROR([Negotiate auth requested but auth disabled])
13fi
14#define list of modules to build
15if test "x$enable_auth_negotiate" = "xyes" ; then
16 SQUID_LOOK_FOR_MODULES([$srcdir/helpers/negotiate_auth],[enable_auth_negotiate])
17fi
18#handle the "none" special case
19if test "x$enable_auth_negotiate" = "xnone" ; then
20 enable_auth_negotiate=""
21fi
22
23NEGOTIATE_AUTH_HELPERS=""
24enable_auth_negotiate="`echo $enable_auth_negotiate| sed -e 's/,/ /g;s/ */ /g'`"
25if test "x$enable_auth_negotiate" != "xno" ; then
26 AUTH_MODULES="$AUTH_MODULES negotiate"
27 AC_DEFINE([HAVE_AUTH_MODULE_NEGOTIATE],1,[Negotiate auth module is built])
28 for helper in $enable_auth_negotiate; do
29 dir="$srcdir/helpers/negotiate_auth/$helper"
30
31 # modules converted to autoconf macros already
32 # NP: we only need this list because m4_include() does not accept variables
33 if test "x$helper" = "xSSPI" ; then
34 m4_include([helpers/negotiate_auth/SSPI/required.m4])
35
36 elif test "x$helper" = "xkerberos" ; then
37 m4_include([helpers/negotiate_auth/kerberos/required.m4])
38
39 elif test "x$helper" = "xwrapper" ; then
40 m4_include([helpers/negotiate_auth/wrapper/required.m4])
41
42 # modules not yet converted to autoconf macros (or third party drop-in's)
43 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
44 BUILD_HELPER="$helper"
45 fi
46
47 if test -d "$srcdir/helpers/negotiate_auth/$helper"; then
48 if test "$BUILD_HELPER" != "$helper"; then
49 AC_MSG_NOTICE([Negotiate auth helper $helper ... found but cannot be built])
50 else
51 NEGOTIATE_AUTH_HELPERS="$NEGOTIATE_AUTH_HELPERS $BUILD_HELPER"
52 fi
53 else
54 AC_MSG_ERROR([Negotiate auth helper $helper ... not found])
55 fi
56 done
57fi
58
59AC_MSG_NOTICE([Negotiate auth helpers to be built: $NEGOTIATE_AUTH_HELPERS])
60AM_CONDITIONAL(ENABLE_AUTH_NEGOTIATE, test "x$enable_auth_negotiate" != "xno")
61AC_SUBST(NEGOTIATE_AUTH_HELPERS)