summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-12-11 13:12:25 +0000
committerAlexander Færøy <ahf@torproject.org>2017-12-11 13:22:39 +0000
commitb0b8f7c30c8296344c77d06a24821f35b667e3dd (patch)
treeff08bbf8bf55a202760a61f197cf484c98875c63 /configure.ac
parent78a582ed880166a73be284ae799397e84fac36a3 (diff)
downloadtor-b0b8f7c30c8296344c77d06a24821f35b667e3dd.tar.gz
tor-b0b8f7c30c8296344c77d06a24821f35b667e3dd.zip
Add support for Android's logging subsystem.
This patch adds support for Android's logging subsystem in Tor. When debugging Android applications it is useful to be able to collect information about the application running on the platform via the various system services that is available on the platform. This patch allows you to add "Log notice android" to your torrc and have Tor send everything above and including the notice severity to Android's ring buffer which can be inspected using the 'adb logcat' program. See: https://bugs.torproject.org/24362
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 82e656d3c5..4316f4e09c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,20 @@ if test x$enable_event_tracing_debug = xyes; then
AC_DEFINE([TOR_EVENT_TRACING_ENABLED], [1], [Compile the event tracing instrumentation])
fi
+dnl Enable Android only features.
+AC_ARG_ENABLE(android,
+ AS_HELP_STRING(--enable-android, [build with Android features enabled]))
+AM_CONDITIONAL([USE_ANDROID], [test "x$enable_android" = "xyes"])
+
+if test "x$enable_android" = "xyes"; then
+ AC_DEFINE([USE_ANDROID], [1], [Compile with Android specific features enabled])
+
+ dnl Check if the Android log library is available.
+ AC_CHECK_HEADERS([android/log.h])
+ AC_SEARCH_LIBS(__android_log_write, [log])
+
+fi
+
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.)