summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-01-18 17:07:07 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-01-18 17:07:55 +0000
commit453339cc22da7b350804bd1911faa99b89815c5b (patch)
treec73b7c6f1722db993bdfa71e4fbf05d8477cca65 /configure.in
parent347bb132e0a3efc82211d4e53bf0aa25ad817cf4 (diff)
android: add --with-android-ndk= option to simplify configure.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index bb8abe685956..638a0fdfb60e 100644
--- a/configure.in
+++ b/configure.in
@@ -90,6 +90,24 @@ if test -z "$SED"; then
fi
dnl ===================================================================
+dnl Building with an android-ndk implies a lot of pre-canned defaults
+dnl ===================================================================
+ANDROID_NDK_HOME=
+if test "z$with_android_ndk" != "z"; then
+ ANDROID_NDK_HOME=$with_android_ndk
+ ANDROID_ABI_PREBUILT_BIN=`echo $ANDROID_NDK_HOME/toolchains/arm-linux*/prebuilt/*/bin`
+ test -z "$SYSBASE" && SYSBASE=$ANDROID_NDK_HOME/platforms/android-9/arch-arm
+ test -z "$AR" && AR=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-ar
+ test -z "$NM" && NM=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-nm
+ test -z "$OBJDUMP" && OBJDUMP=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-objdump
+ test -z "$RANLIB" && RANLIB=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-ranlib
+ test -z "$STRIP" && STRIP=$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-strip
+ test -z "$CC" && CC="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-gcc --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a"
+ test -z "$CXX" && CXX="$ANDROID_ABI_PREBUILT_BIN/arm-linux-androideabi-g++ --sysroot $ANDROID_NDK_HOME/platforms/android-9/arch-arm -I $ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/include -I$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/include -L$ANDROID_NDK_HOME/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a -fexceptions -frtti"
+fi
+AC_SUBST(ANDROID_NDK_HOME)
+
+dnl ===================================================================
dnl The following is a list of supported systems.
dnl Sequential to keep the logic very simple
dnl These values may be checked and reset later.
@@ -833,6 +851,11 @@ AC_ARG_ENABLE(silent-msi,
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
+AC_ARG_WITH(android-ndk,
+ AS_HELP_STRING([--with-android-ndk],
+ [Specify location of the Android Native Development Kit to use for buildin.]),
+,)
+
AC_ARG_WITH(gnu-patch,
AS_HELP_STRING([--with-gnu-patch],
[Specify location of GNU patch on Solaris or FreeBSD.]),