[vlc-commits] Detect Android in configure

Jean-Baptiste Kempf git at videolan.org
Thu Jun 2 13:40:53 CEST 2011


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jun  1 16:43:45 2011 +0200| [59eb19a94fbd3ffb6367807fc8f8b444645cc439] | committer: Jean-Baptiste Kempf

Detect Android in configure

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=59eb19a94fbd3ffb6367807fc8f8b444645cc439
---

 configure.ac |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index f5c9ee2..a96b82c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -403,6 +403,23 @@ case "${build_os}" in
     ;;
 esac
 
+dnl Android is linux, but a bit different
+AS_IF([test "$SYS" = linux],[
+    AC_MSG_CHECKING([for an Android system])
+    AC_PREPROC_IFELSE([AC_LANG_PROGRAM(
+        [[#ifndef __ANDROID__
+         # error Not Android
+         #endif
+        ]],[[;]])
+    ],[
+      HAVE_ANDROID="1"
+      AC_MSG_RESULT([yes])
+    ],[
+      AC_MSG_RESULT([no])
+    ])
+])
+AM_CONDITIONAL(HAVE_ANDROID, test "${HAVE_ANDROID}" = "1")
+
 dnl
 dnl  Libtool
 dnl  It's very bad, but our former custom system was worst



More information about the vlc-commits mailing list