tests: Conditional compilation of tests (including boost-based unit tests)

To compile tests, code needs to be configured with --with-tests option,
otherwise all tests are disabled.

Tests that are based on Boost's unit test framework are enabled only if
the framework is detected during the configure time.

Change-Id: Ia1768e24b088e4f19d2a8799c6d5baeabb2f44c5
diff --git a/Makefile.am b/Makefile.am
index 951e891..ccf8ee0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,7 +12,14 @@
 lib_LTLIBRARIES = libndn-c.la libndn-cpp.la
 
 # "make install" will also install the include headers.
-SUBDIRS = include . tests
+SUBDIRS = include .
+
+if COMPILE_TESTS
+  SUBDIRS += tests
+if HAVE_BOOST_UNIT_TEST_FRAMEWORK
+  SUBDIRS += tests_boost
+endif
+endif
 
 # Just the C code.
 ## To regenerate: