]> git.ipfire.org Git - thirdparty/squid.git/blame - helpers/log_daemon/modules.m4
Sync with trunk rev.14515
[thirdparty/squid.git] / helpers / log_daemon / modules.m4
CommitLineData
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
6a8b1040 11# FIXME: de-duplicate $enable_log_daemon_helpers list containing double entries.
5eabe4b4
AJ
12
13#define list of modules to build
c1bbd56c 14auto_logdaemon_modules=no
6a8b1040
AJ
15if test "x${enable_log_daemon_helpers:=yes}" = "xyes" ;then
16 enable_log_daemon_helpers=""
17 SQUID_LOOK_FOR_MODULES([$srcdir/helpers/log_daemon],[enable_log_daemon_helpers])
c1bbd56c 18 auto_logdaemon_modules=yes
6a8b1040
AJ
19fi
20if test "x$enable_log_daemon_helpers" = "xnone" ; then
21 enable_log_daemon_helpers=""
5eabe4b4
AJ
22fi
23
24LOG_DAEMON_HELPERS=""
6a8b1040
AJ
25enable_log_daemon_helpers="`echo $enable_log_daemon_helpers| sed -e 's/,/ /g;s/ */ /g'`"
26if test "x$enable_log_daemon_helpers" != "xno"; then
27 for helper in $enable_log_daemon_helpers ; do
5eabe4b4
AJ
28 dir="$srcdir/helpers/log_daemon/$helper"
29
30 # modules converted to autoconf macros already
31 # NP: we only need this list because m4_include() does not accept variables
32 if test "x$helper" = "xDB" ; then
33 m4_include([helpers/log_daemon/DB/required.m4])
34
35 elif test "x$helper" = "xfile" ; then
36 m4_include([helpers/log_daemon/file/required.m4])
37
38 # modules not yet converted to autoconf macros (or third party drop-in's)
39 elif test -f "$dir/config.test" && sh "$dir/config.test" "$squid_host_os"; then
40 BUILD_HELPER="$helper"
41 fi
42
43 if test -d "$srcdir/helpers/log_daemon/$helper"; then
44 if test "$BUILD_HELPER" != "$helper"; then
c1bbd56c
AJ
45 if test "x$auto_logdaemon_modules" = "xyes"; then
46 AC_MSG_NOTICE([Log daemon helper $helper ... found but cannot be built])
47 else
48 AC_MSG_ERROR([Log daemon helper $helper ... found but cannot be built])
49 fi
5eabe4b4
AJ
50 else
51 LOG_DAEMON_HELPERS="$LOG_DAEMON_HELPERS $BUILD_HELPER"
52 fi
53 else
54 AC_MSG_ERROR([Log daemon helper $helper ... not found])
55 fi
56 done
57fi
58AC_MSG_NOTICE([Log daemon helpers to be built: $LOG_DAEMON_HELPERS])
59AC_SUBST(LOG_DAEMON_HELPERS)