From 08a9f3ae8d075537ad9fabc41fa00c113fe469d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Tue, 25 Nov 2014 17:40:41 -0500
Subject: [PATCH] don't build dhtnode by default

---
 Makefile.am  | 6 +++++-
 configure.ac | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 0f53a449..9b8400d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = src tools
+SUBDIRS = src
+if ENABLE_TOOLS
+SUBDIRS += tools
+endif
+
 ACLOCAL_AMFLAGS = -I m4
 
 DOC_FILES = \
diff --git a/configure.ac b/configure.ac
index 4a756c83..4cbebdab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,5 +18,8 @@ AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
 PKG_PROG_PKG_CONFIG()
 PKG_CHECK_MODULES([GNUTLS], [gnutls >= 3.1])
 
+AC_ARG_ENABLE([tools], AS_HELP_STRING([--enable-tools], [Enable tools (CLI DHT node)]),build_tools=yes,)
+AM_CONDITIONAL(ENABLE_TOOLS, test x$build_tools == xyes)
+
 AC_CONFIG_FILES([Makefile src/Makefile tools/Makefile opendht.pc])
 AC_OUTPUT
-- 
GitLab