]> git.sesse.net Git - vlc/commitdiff
Detect Android in configure
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 1 Jun 2011 14:43:45 +0000 (16:43 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 1 Jun 2011 22:40:54 +0000 (00:40 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
configure.ac

index f5c9ee2e52894382364b9aed06d311843400e99a..a96b82c4e553deb847425b82eb29b57dc72b1fe2 100644 (file)
@@ -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