]>
Commit | Line | Data |
---|---|---|
ef57eb7b | 1 | ## Copyright (C) 1996-2016 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 | ||
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_url_rewrite_helpers list containing double entries. | |
12 | ||
13 | #define list of modules to build | |
c1bbd56c | 14 | auto_urlrewrite_modules=no |
5eabe4b4 AJ |
15 | if test "x${enable_url_rewrite_helpers:=yes}" = "xyes" ; then |
16 | SQUID_LOOK_FOR_MODULES([$srcdir/helpers/url_rewrite],[enable_url_rewrite_helpers]) | |
c1bbd56c | 17 | auto_urlrewrite_modules=yes |
5eabe4b4 AJ |
18 | fi |
19 | ||
20 | enable_url_rewrite_helpers="`echo $enable_url_rewrite_helpers| sed -e 's/,/ /g;s/ */ /g'`" | |
21 | AC_MSG_NOTICE([URL rewrite helper candidates: $enable_url_rewrite_helpers]) | |
22 | URL_REWRITE_HELPERS="" | |
23 | if test "x$enable_url_rewrite_helpers" != "xno" ; then | |
24 | for helper in $enable_url_rewrite_helpers; do | |
25 | dir="$srcdir/helpers/url_rewrite/$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([helpers/url_rewrite/fake/required.m4]) | |
31 | ||
dc5f403f AJ |
32 | elif test "x$helper" = "xLFS" ; then |
33 | m4_include([helpers/url_rewrite/LFS/required.m4]) | |
34 | ||
5eabe4b4 AJ |
35 | # modules not yet converted to autoconf macros (or third party drop-in's) |
36 | elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then | |
37 | BUILD_HELPER="$helper" | |
38 | fi | |
39 | ||
40 | if test -d "$srcdir/helpers/url_rewrite/$helper"; then | |
41 | if test "$BUILD_HELPER" != "$helper"; then | |
c1bbd56c AJ |
42 | if test "x$auto_urlrewrite_modules" = "xyes"; then |
43 | AC_MSG_NOTICE([URL rewrite helper $helper ... found but cannot be built]) | |
44 | else | |
45 | AC_MSG_ERROR([URL rewrite helper $helper ... found but cannot be built]) | |
46 | fi | |
5eabe4b4 AJ |
47 | else |
48 | URL_REWRITE_HELPERS="$URL_REWRITE_HELPERS $BUILD_HELPER" | |
49 | fi | |
50 | else | |
51 | AC_MSG_ERROR([URL rewrite helper $helper ... not found]) | |
52 | fi | |
53 | done | |
54 | fi | |
55 | AC_MSG_NOTICE([URL rewrite helpers to be built: $URL_REWRITE_HELPERS]) | |
56 | AC_SUBST(URL_REWRITE_HELPERS) |