]> git.ipfire.org Git - thirdparty/squid.git/blame - src/security/cert_generators/helpers.m4
Maintenance: Remove FIXME and \todo labels (#647)
[thirdparty/squid.git] / src / security / cert_generators / helpers.m4
CommitLineData
77b1029d 1## Copyright (C) 1996-2020 The Squid Software Foundation and contributors
cb0b3d63
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
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_security_cert_generators list containing double entries.
cb0b3d63
AJ
12
13#define list of modules to build
14auto_security_modules=no
8732ea9d
AJ
15if test "x${enable_security_cert_generators:=yes}" = "xyes" ; then
16 SQUID_LOOK_FOR_MODULES([$srcdir/src/security/cert_generators],[enable_security_cert_generators])
cb0b3d63
AJ
17 auto_security_certgen_modules=yes
18fi
19
8732ea9d
AJ
20enable_security_cert_generators="`echo $enable_security_cert_generators| sed -e 's/,/ /g;s/ */ /g'`"
21AC_MSG_NOTICE([Security certificate generator helper candidates: $enable_security_cert_generators])
cb0b3d63 22SECURITY_CERTGEN_HELPERS=""
8732ea9d
AJ
23if test "x$enable_security_cert_generators" != "xno" ; then
24 for helper in $enable_security_cert_generators; do
cb0b3d63
AJ
25 dir="$srcdir/src/security/cert_generators/$helper"
26
27 # modules converted to autoconf macros already
28 # NP: we only need this list because m4_include() does not accept variables
29 if test "x$helper" = "xfile" ; then
30 m4_include([src/security/cert_generators/file/required.m4])
31
32 # modules not yet converted to autoconf macros (or third party drop-in's)
33 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
34 BUILD_HELPER="$helper"
35 fi
36
37 if test -d "$srcdir/src/security/cert_generators/$helper"; then
38 if test "$BUILD_HELPER" != "$helper"; then
39 if test "x$auto_security_certgen_modules" = "xyes"; then
40 AC_MSG_NOTICE([Security certificate generator helper $helper ... found but cannot be built])
41 else
42 AC_MSG_ERROR([Security certificate generator helper $helper ... found but cannot be built])
43 fi
44 else
45 SECURITY_CERTGEN_HELPERS="$SECURITY_CERTGEN_HELPERS $BUILD_HELPER"
46 fi
47 else
48 AC_MSG_ERROR([Security certificate generator helper $helper ... not found])
49 fi
50 done
51fi
52AC_MSG_NOTICE([Security certificate generator helpers to be built: $SECURITY_CERTGEN_HELPERS])
53AC_SUBST(SECURITY_CERTGEN_HELPERS)
54
55# XXX: Enabling the interface in Squid still requires separate option
56AC_ARG_ENABLE(ssl-crtd,
57 AC_HELP_STRING([--enable-ssl-crtd],
58 [Prevent Squid from directly generating TLS/SSL private key
59 and certificate. Instead enables the certificate generator
60 processes.]), [
61 SQUID_YESNO([$enableval],
62 [unrecogized argument to --enable-ssl-crtd: $enableval])
63])
64if test "x$enable_ssl_crtd" = "xyes" -a "x$with_openssl" = "xno" ; then
051da40c 65 AC_MSG_ERROR([You need ssl gatewaying support to enable ssl-crtd feature. Try to use --with-openssl.])
cb0b3d63 66fi
051da40c 67SQUID_DEFINE_BOOL(USE_SSL_CRTD, ${enable_ssl_crtd:=no},[Use ssl-crtd daemon])