[vlc-devel] [RFO] Android configure detection

Jean-Baptiste Kempf jb at videolan.org
Wed Jun 1 21:41:38 CEST 2011


Hello,

On Wed, Jun 01, 2011 at 04:47:34PM +0200, Jean-Baptiste Kempf wrote :
> This is a Request For Opinion about the Android detection in configure.
> This means, that I am far from sure that this is the best idea, but I
> wanted a bit of feedback.

2nd version.

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

diff --git a/configure.ac b/configure.ac
index 036f502..8624498 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

Best Regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list