aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-05-01 10:29:05 -0400
committerNick Mathewson <nickm@torproject.org>2018-05-01 10:29:05 -0400
commitd018bf199c9e566202eef0bb7fb68c2567c4a25e (patch)
tree83b81729b2c25a21bd2ef61e9350667d2fa56d7e /configure.ac
parent4cf6b67f5e83e1a26b4b2fbdb3b169c137a30687 (diff)
parentd8509b450a1de815399a42b5df8c6b25789429c7 (diff)
downloadtor-d018bf199c9e566202eef0bb7fb68c2567c4a25e.tar.gz
tor-d018bf199c9e566202eef0bb7fb68c2567c4a25e.zip
Merge remote-tracking branch 'dgoulet/ticket25610_034_01-squashed'
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index aa2617b70a..387fc6fbeb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,31 @@ if test "x$enable_android" = "xyes"; then
fi
+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],
+ [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 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.)