Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/eglib
diff options
context:
space:
mode:
authorJonathan Pryor <jonpryor@vt.edu>2011-06-04 00:42:38 +0400
committerJonathan Pryor <jonpryor@vt.edu>2011-06-04 00:42:38 +0400
commit46f61e7240a8e2d0a0625b9990c8926efeafde89 (patch)
treecfdf67acd33619b327592f55317c7b2ccb87ed50 /eglib
parent0d0930f3a4c2730142e03c34784d76c1daa62d88 (diff)
Simplify building with the Android NDK.
Check --host against *-*-linux-android* for Android-specific configure fixes, and improve **/Makefile.am to simplify Android support: ./configure \ --build=`./config.guess` \ --host=armv5-linux-androideabi \ --target=armv5-linux-androideabi \ --enable-nls=no --with-mcs-docs=no --enable-mcs-build=no \ CC="/path/to/ndk/arm-linux-androideabi-gcc --sysroot=/path/to/sysroot" \ AR="..." AS="..." CPP="..." CXX="..." LD="..." RANLIB="..." STRIP="..." CFLAGS="-DARM_FPU_NONE=1" CXXFLAGS="-DARM_FPU_NONE=1" See also Android NDK docs/STANDALONE-TOOLCHAIN.html. The Android NDK/bionic is "interesting", in that it's lacking header files and macros normally present on Linux which otherwise break the build (e.g. no <link.h> which breaks Boehm support). Using --host with an android target works around the known issues, simplifying the building of libmonosgen-2.0.so with the Android NDK toolchain.
Diffstat (limited to 'eglib')
-rw-r--r--eglib/configure.ac9
-rw-r--r--eglib/src/Makefile.am4
2 files changed, 13 insertions, 0 deletions
diff --git a/eglib/configure.ac b/eglib/configure.ac
index 1e20bef6e2e..791a9f760b7 100644
--- a/eglib/configure.ac
+++ b/eglib/configure.ac
@@ -44,6 +44,7 @@ AM_CONDITIONAL(CROSS_COMPILING, [test x$cross_compiling = xyes])
AC_C_BIGENDIAN([ORDER=G_BIG_ENDIAN],[ORDER=G_LITTLE_ENDIAN])
platform_darwin=no
+platform_android=no
case $host in
*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
@@ -59,6 +60,13 @@ case $host in
OS="UNIX"
PIDTYPE='int'
;;
+*-*-linux-android*)
+ platform_android=yes
+ PATHSEP='/'
+ SEARCHSEP=':'
+ OS="UNIX"
+ PIDTYPE='int'
+ ;;
*)
PATHSEP='/'
SEARCHSEP=':'
@@ -95,6 +103,7 @@ AC_SUBST(PIDTYPE)
AM_CONDITIONAL(HOST_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(TARGET_WIN32, test x$OS = xWIN32)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
+AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(void *)
diff --git a/eglib/src/Makefile.am b/eglib/src/Makefile.am
index 00b797fc4ae..94bee684e04 100644
--- a/eglib/src/Makefile.am
+++ b/eglib/src/Makefile.am
@@ -63,6 +63,10 @@ INCLUDES = -I$(srcdir)
if HOST_WIN32
libeglib_la_LIBADD = -lm $(LIBICONV) -lpsapi
+else
+if PLATFORM_ANDROID
+libeglib_la_LIBADD = -llog
+endif
endif
libeglib_static_la_LIBADD = $(libeglib_la_LIBADD) $(LIBICONV)