diff options
author | David Goulet <dgoulet@torproject.org> | 2018-04-27 11:33:22 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-05-01 10:07:09 -0400 |
commit | 43bba89656cce89964f260d46f2550ab9af00c9e (patch) | |
tree | ee61931d1ce7d095abf4e3eb6db5f9d54a18b78f /configure.ac | |
parent | a2ff4975f372870c841a8c4eeeeb93d834663650 (diff) | |
download | tor-43bba89656cce89964f260d46f2550ab9af00c9e.tar.gz tor-43bba89656cce89964f260d46f2550ab9af00c9e.zip |
build: Always compile module support for tests
The --disable-module-* configure option removes code from the final binary but
we still build the unit tests with the disable module(s) so we can actually
test that code path all the time and not forget about it.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b423ea95e5..ae2c420557 100644 --- a/configure.ac +++ b/configure.ac @@ -234,6 +234,9 @@ dnl --- dnl Tor modules options. These options are namespaced with --disable-module-XXX dnl --- +dnl All our modules. +m4_define(MODULES, dirauth) + dnl Directory Authority module. AC_ARG_ENABLE([module-dirauth], AS_HELP_STRING([--disable-module-dirauth], @@ -243,6 +246,15 @@ AC_ARG_ENABLE([module-dirauth], [Compile with Directory Authority feature support])) AM_CONDITIONAL(BUILD_MODULE_DIRAUTH, [test "x$enable_module_dirauth" != "xno"]) +dnl Helper variables. +TOR_MODULES_ALL_ENABLED= +AC_DEFUN([ADD_MODULE], [ + MODULE=m4_toupper($1) + TOR_MODULES_ALL_ENABLED="${TOR_MODULES_ALL_ENABLED} -DHAVE_MODULE_${MODULE}=1" +]) +m4_foreach_w([module], MODULES, [ADD_MODULE([module])]) +AC_SUBST(TOR_MODULES_ALL_ENABLED) + dnl check for the correct "ar" when cross-compiling. dnl (AM_PROG_AR was new in automake 1.11.2, which we do not yet require, dnl so kludge up a replacement for the case where it isn't there yet.) |