From 12a0c93433a0b1d7e8019fc35a63476db39327fa Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 24 Oct 2012 16:44:34 +0200 Subject: Fix ttyname problem on Android. * configure.ac: Define macro and conditional HAVE_ANDROID_SYSTEM. * m4/gnupg-ttyname.m4: Force use of replacement on Android. * src/ttyname_r.c: Ditto. -- Android's bionic lib has no working ttyname_r() nor ttyname(). Using them anyway will print FIX ME! implement ttyname_r() bionic/libc/bionic/stubs.c:466 Thus we force the use of our replacement code which simply return "/dev/tty". --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 3cac8267..8f6505e5 100644 --- a/configure.ac +++ b/configure.ac @@ -131,6 +131,7 @@ GPGCONF_DEFAULT=no G13_DEFAULT=no component_system=None have_dosish_system=no +have_android_system=no have_w32_system=no have_w64_system=no build_w32_glib=no @@ -142,6 +143,9 @@ case "${host}" in *-mingw32ce*) have_w32ce_system=yes ;; + *-linux-androideabi) + have_android_system=yes + ;; esac case "${host}" in *-mingw32ce*|*-mingw32*) @@ -210,6 +214,11 @@ if test "$have_w32ce_system" = yes; then fi 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) + AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes) AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes) -- cgit v1.2.3