]> git.ipfire.org Git - thirdparty/squid.git/blob - src/log/helpers.m4
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / log / helpers.m4
1 ## Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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
11 # FIXME: de-duplicate $enable_log_daemon_helpers list containing double entries.
12
13 #define list of modules to build
14 auto_logdaemon_modules=no
15 if test "x${enable_log_daemon_helpers:=yes}" = "xyes" ;then
16 enable_log_daemon_helpers=""
17 SQUID_LOOK_FOR_MODULES([$srcdir/src/log],[enable_log_daemon_helpers])
18 auto_logdaemon_modules=yes
19 fi
20 if test "x$enable_log_daemon_helpers" = "xnone" ; then
21 enable_log_daemon_helpers=""
22 fi
23
24 LOG_DAEMON_HELPERS=""
25 enable_log_daemon_helpers="`echo $enable_log_daemon_helpers| sed -e 's/,/ /g;s/ */ /g'`"
26 if test "x$enable_log_daemon_helpers" != "xno"; then
27 for helper in $enable_log_daemon_helpers ; do
28 dir="$srcdir/src/log/$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([src/log/DB/required.m4])
34
35 elif test "x$helper" = "xfile" ; then
36 m4_include([src/log/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/src/log/$helper"; then
44 if test "$BUILD_HELPER" != "$helper"; then
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
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
57 fi
58 AC_MSG_NOTICE([Log daemon helpers to be built: $LOG_DAEMON_HELPERS])
59 AC_SUBST(LOG_DAEMON_HELPERS)