move Android build config into core tor
Guardian Project has maintained a wrapper build system for building tor for Android since the beginning. Since many more people are now building tor for Android, I'm working to upstream as much of that as possible. The goal is that the requirements for building on Android can be fulfilled by tor's own _configure.ac_. The first change is to remove the unnecessary `./configure --enable-android` option. * Android NDK compilers define `__ANDROID__` so that can be used for Android-only code without adding anything in _configure.ac_, (following the standard pattern like `__APPLE__`, `__linux__`, `__FreeBSD__`, `_WIN32`, etc. * _android/log.h_ and `__android_log_write()` are **always** present if building for Android, so this would be like testing for `printf()` on UNIX. Then move the Android config into _configure.ac_ reusing the `./configure --enable-android` flag. A working sketch for that is here: https://trac.torproject.org/projects/tor/ticket/28766#comment:6 The last piece is including a Java JNI wrapper in tor, enabled by `./configure --enable-jni`. This lets us run tor as an Android `Service`, which is the Android equivalent of a UNIX daemon (UNIX daemons are not really supported on Android and using them is quite problematic). This JNI API should be generic enough to be useable in Java in general, though that's not a priority for us. I'll add patches for merging once we agree on these details. I have this all working already on my machine.
issue