aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans-Christoph Steiner <[email protected]>2012-08-17 02:43:15 +0000
committerWerner Koch <[email protected]>2012-08-24 07:37:23 +0000
commit1da04bfb3f5714a0fa6d0b779d0d2ae4e9544b8f (patch)
tree40ad55b861c0967051c9271d7a024900ea595ca0
parentFix left over use of jnlib on some platforms (diff)
downloadgnupg-1da04bfb3f5714a0fa6d0b779d0d2ae4e9544b8f.tar.gz
gnupg-1da04bfb3f5714a0fa6d0b779d0d2ae4e9544b8f.zip
Fix build system for Android by disabling tests since its x-compiled
* configure.ac (HAVE_ANDROID_SYSTEM, RUN_TESTS): New. (AH_BOTTOM) [__ANDROID__]: Do not re-define ttyname. * Makefile.am: Depend tests on new RUN_TESTS conditional.
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac24
2 files changed, 20 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index 6207d7bb9..c5ac11c4e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,10 +82,10 @@ else
doc =
endif
-if HAVE_W32_SYSTEM
-tests =
-else
+if RUN_TESTS
tests = tests
+else
+tests =
endif
SUBDIRS = m4 gl include common ${kbx} \
diff --git a/configure.ac b/configure.ac
index d46a8385d..0241a9d6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -494,13 +494,6 @@ AH_BOTTOM([
# endif
#endif
-/* Hacks required for Android. */
-#ifdef __ANDROID__
- /* ttyname is a stub in BIONIC, printing a FIXME warning. */
-# define ttyname broken_native_ttyname
-# undef HAVE_TTYNAME
-#endif /*__ANDROID__*/
-
/* Tell libgcrypt not to use its own libgpg-error implementation. */
#define USE_LIBGPG_ERROR 1
@@ -585,6 +578,8 @@ try_gettext=yes
have_dosish_system=no
have_w32_system=no
have_w32ce_system=no
+have_android_system=no
+run_tests=yes
use_simple_gettext=no
use_ldapwrapper=yes
mmap_needed=yes
@@ -601,6 +596,7 @@ case "${host}" in
disable_keyserver_path=yes
have_dosish_system=yes
have_w32_system=yes
+ run_tests=no
use_ldapwrapper=no # Fixme: Do this only for CE.
case "${host}" in
*-mingw32ce*)
@@ -660,6 +656,10 @@ case "${host}" in
;;
m68k-atari-mint)
;;
+ *-linux-androideabi)
+ have_android_system=yes
+ run_tests=no
+ ;;
*)
;;
esac
@@ -684,6 +684,16 @@ fi
AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
+if test "$have_android_system" = yes; then
+ AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system])
+fi
+AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes)
+
+if test "$run_tests" = yes; then
+ AC_DEFINE(RUN_TESTS,1, [Defined if we should run the tests])
+fi
+AM_CONDITIONAL(RUN_TESTS, test "$run_tests" = yes)
+
if test "$use_ldapwrapper" = yes; then
AC_DEFINE(USE_LDAPWRAPPER,1, [Build dirmngr with LDAP wrapper process])
fi