summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Landden <slandden@gmail.com>2017-11-05 10:33:40 -0800
committerShawn Landden <slandden@gmail.com>2017-11-05 12:32:17 -0800
commit764e18f0089a2ddca710828845fced3da0ef90ee (patch)
treefa9ac0e985c687544c53b148339ca5d9d8dec29e
parent8a5409659b15a6ad5bae3ccc84bbdddb1d43998f (diff)
downloaddistcc-git-764e18f0089a2ddca710828845fced3da0ef90ee.tar.gz
Android support
Amazingly this what the only patch require to build on temux https://github.com/termux
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c77c802..fb74ff3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,20 @@ getpeername(0,0,&len);
[#include <sys/types.h>
#include <sys/socket.h>])
+dnl Android requires -llog for printf and friends
+AC_MSG_CHECKING([if building on Android])
+AC_TRY_COMPILE([
+ #ifdef __BIONIC__
+ int ok;
+ (void)ok;
+ #else
+ choke me
+ #endif],
+[func("a"); func("a", "b"); func("a", "b", "c")],
+[AC_MSG_RESULT(yes)
+ LDFLAGS="$LDFLAGS -llog"],
+[AC_MSG_RESULT(no)])
+
# TODO: Handle program transform rules by autoconf.
### Checks for configure options