]> git.ipfire.org Git - thirdparty/squid.git/blame - src/store/id_rewriters/helpers.m4
Maintenance: Remove FIXME and \todo labels (#647)
[thirdparty/squid.git] / src / store / id_rewriters / helpers.m4
CommitLineData
77b1029d 1## Copyright (C) 1996-2020 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
0d5ee502
AM
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_storeid_rewrite_helpers list containing double entries.
0d5ee502
AM
12
13#define list of modules to build
c1bbd56c 14auto_storeid_modules=no
0d5ee502 15if test "x${enable_storeid_rewrite_helpers:=yes}" = "xyes" ; then
0c1f8b9b 16 SQUID_LOOK_FOR_MODULES([$srcdir/src/store/id_rewriters],[enable_storeid_rewrite_helpers])
c1bbd56c 17 auto_storeid_modules=yes
0d5ee502
AM
18fi
19
20enable_storeid_rewrite_helpers="`echo $enable_storeid_rewrite_helpers| sed -e 's/,/ /g;s/ */ /g'`"
21AC_MSG_NOTICE([Store-ID rewrite helper candidates: $enable_storeid_rewrite_helpers])
22STOREID_REWRITE_HELPERS=""
23if test "x$enable_storeid_rewrite_helpers" != "xno" ; then
24 for helper in $enable_storeid_rewrite_helpers; do
0c1f8b9b 25 dir="$srcdir/src/store/id_rewriters/$helper"
0d5ee502
AM
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
0c1f8b9b 30 m4_include([src/store/id_rewriters/file/required.m4])
0d5ee502
AM
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
0c1f8b9b 37 if test -d "$srcdir/src/store/id_rewriters/$helper"; then
0d5ee502 38 if test "$BUILD_HELPER" != "$helper"; then
c1bbd56c
AJ
39 if test "x$auto_storeid_modules" = "xyes"; then
40 AC_MSG_NOTICE([Store-ID rewrite helper $helper ... found but cannot be built])
41 else
42 AC_MSG_ERROR([Store-ID rewrite helper $helper ... found but cannot be built])
43 fi
0d5ee502
AM
44 else
45 STOREID_REWRITE_HELPERS="$STOREID_REWRITE_HELPERS $BUILD_HELPER"
46 fi
47 else
48 AC_MSG_ERROR([Store-ID rewrite helper $helper ... not found])
49 fi
50 done
51fi
52AC_MSG_NOTICE([Store-ID rewrite helpers to be built: $STOREID_REWRITE_HELPERS])
53AC_SUBST(STOREID_REWRITE_HELPERS)