summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Landden <slandden@gmail.com>2018-02-25 10:30:49 -0800
committerGitHub <noreply@github.com>2018-02-25 10:30:49 -0800
commit138ea63a31b6241cca9f21d061476a3efb5981c4 (patch)
treee2f90195de161dbf531ad9ab6fae2d1e6744434c
parent25f688e911b83c34fc1cecf5619bdbcc48075785 (diff)
parentdfdb2b3e4d8f74e72477457eae80fce8b9843101 (diff)
downloaddistcc-git-138ea63a31b6241cca9f21d061476a3efb5981c4.tar.gz
Merge pull request #238 from shawnl/android
Android support
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8b4a9b2..d8a7abf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,21 @@ getpeername(0,0,&len);
[#include <sys/types.h>
#include <sys/socket.h>])
+dnl Android requires -llog for printf and friends
+dnl and will only run position independant executables
+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 -pie"],
+[AC_MSG_RESULT(no)])
+
# TODO: Handle program transform rules by autoconf.
### Checks for configure options