aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-07-15 12:02:18 -0400
committerNick Mathewson <nickm@torproject.org>2013-07-15 12:02:18 -0400
commitc0391bae75e9eb71f5fa2ab24fc97792c204225d (patch)
tree9701969423b86fdc2ba04080338d817c3b5c9864 /configure.ac
parent2cb59be9993ecec13ceabc0c4754e52f8c5ea4e5 (diff)
parentec6c155f827000e337796f1f1c54299fbc5cf72a (diff)
downloadtor-c0391bae75e9eb71f5fa2ab24fc97792c204225d.tar
tor-c0391bae75e9eb71f5fa2ab24fc97792c204225d.tar.gz
Merge remote-tracking branch 'public/fancy_test_tricks'
Conflicts: src/common/include.am Conflict was from adding testsupport.h near where sandbox.h had already been added.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 68c8ce47b..73299696e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,15 @@ AC_ARG_ENABLE(static-tor,
AS_HELP_STRING(--enable-static-tor, Create an entirely static Tor binary. Requires --with-openssl-dir and --with-libevent-dir and --with-zlib-dir))
AC_ARG_ENABLE(curve25519,
AS_HELP_STRING(--disable-curve25519, Build Tor with no curve25519 elliptic-curve crypto support))
+AC_ARG_ENABLE(unittests,
+ AS_HELP_STRING(--disable-unittests, [Don't build unit tests for Tor. Risky!]))
+AC_ARG_ENABLE(coverage,
+ AS_HELP_STRING(--enable-coverage, [Enable coverage support in the unit-test build]))
+
+AM_CONDITIONAL(UNITTESTS_ENABLED, test x$enable_unittests != xno)
+AM_CONDITIONAL(COVERAGE_ENABLED, test x$enable_coverage = xyes)
+
+echo "COVERAGE: $enable_coverage"
if test "$enable_static_tor" = "yes"; then
enable_static_libevent="yes";
@@ -1459,7 +1468,12 @@ if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy
# CFLAGS="$CFLAGS -Winline"
fi
-
+if test "$enable_coverage" = yes && test "$have_clang" = "no"; then
+ case "$host_os" in
+ darwin*)
+ AC_MSG_WARN([Tried to enable coverage on OSX without using the clang compiler. This might not work! If coverage fails, use CC=clang when configuring with --enable-profiling.])
+ esac
+fi
CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"