summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-04-03 15:06:34 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-04-27 11:40:44 -0400
commitb27dc1cfb5867ad5853548acc6e1167a49395917 (patch)
treea81f8f1e4ea010c73811e211d83706b1076cf986 /configure.ac
parent3a47dfed349ee2c05f30ba142d3583772fa2287f (diff)
downloadtor-b27dc1cfb5867ad5853548acc6e1167a49395917.tar.gz
tor-b27dc1cfb5867ad5853548acc6e1167a49395917.zip
mod: Build system changes for dirauth module
Make our build system support a disable dirauth module option. It can only be disabled explicitly with: $ ./configure --disable-module-dirauth If *not* specified that is enabled, an automake conditional variable is set to true and a defined value for the C code: AM_CONDITIONAL: BUILD_MODULE_DIRAUTH AC_DEFINE: HAVE_MODULE_DIRAUTH=1 This introduces the dirauth/ module directory in src/or/ for which .c files are only compiled if the BUILD_MODULE_DIRAUTH is set. All the header files are compiled in regardless of the support so we can use the alternative entry point functions of the dirauth subsystem. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 878f5a88bb..b423ea95e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,19 @@ if test "x$enable_android" = "xyes"; then
fi
+dnl ---
+dnl Tor modules options. These options are namespaced with --disable-module-XXX
+dnl ---
+
+dnl Directory Authority module.
+AC_ARG_ENABLE([module-dirauth],
+ AS_HELP_STRING([--disable-module-dirauth],
+ [Do not build tor with the dirauth module]),
+ [], dnl Action if-given
+ AC_DEFINE([HAVE_MODULE_DIRAUTH], [1],
+ [Compile with Directory Authority feature support]))
+AM_CONDITIONAL(BUILD_MODULE_DIRAUTH, [test "x$enable_module_dirauth" != "xno"])
+
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.)