]> git.ipfire.org Git - thirdparty/squid.git/blame - src/security/cert_validators/helpers.m4
SourceFormat Enforcement
[thirdparty/squid.git] / src / security / cert_validators / helpers.m4
CommitLineData
4ac4a490 1## Copyright (C) 1996-2017 The Squid Software Foundation and contributors
bbf79f12
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
8732ea9d 11# FIXME: de-duplicate $enable_security_cert_validators list containing double entries.
bbf79f12
AJ
12
13#define list of modules to build
cb0b3d63 14auto_security_certv_modules=no
8732ea9d
AJ
15if test "x${enable_security_cert_validators:=yes}" = "xyes" ; then
16 SQUID_LOOK_FOR_MODULES([$srcdir/src/security/cert_validators],[enable_security_cert_validators])
cb0b3d63 17 auto_security_certv_modules=yes
bbf79f12
AJ
18fi
19
8732ea9d
AJ
20enable_security_cert_validators="`echo $enable_security_cert_validators| sed -e 's/,/ /g;s/ */ /g'`"
21AC_MSG_NOTICE([Security certificate validator helper candidates: $enable_security_cert_validators])
bbf79f12 22SECURITY_CERTV_HELPERS=""
8732ea9d
AJ
23if test "x$enable_security_cert_validators" != "xno" ; then
24 for helper in $enable_security_cert_validators; do
bbf79f12
AJ
25 dir="$srcdir/src/security/cert_validators/$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" = "xfake" ; then
30 m4_include([src/security/cert_validators/fake/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_validators/$helper"; then
38 if test "$BUILD_HELPER" != "$helper"; then
cb0b3d63 39 if test "x$auto_security_certv_modules" = "xyes"; then
bbf79f12
AJ
40 AC_MSG_NOTICE([Security certificate validator helper $helper ... found but cannot be built])
41 else
42 AC_MSG_ERROR([Security certificate validator helper $helper ... found but cannot be built])
43 fi
44 else
45 SECURITY_CERTV_HELPERS="$SECURITY_CERTV_HELPERS $BUILD_HELPER"
46 fi
47 else
48 AC_MSG_ERROR([Security certificate validator helper $helper ... not found])
49 fi
50 done
51fi
52AC_MSG_NOTICE([Security certificate validator helpers to be built: $SECURITY_CERTV_HELPERS])
53AC_SUBST(SECURITY_CERTV_HELPERS)