[Android] build: add android ndk fixup: fix x86 and android-L build

Thomas Guillem git at videolan.org
Sat Oct 11 13:10:18 CEST 2014


vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Fri Oct 10 15:46:49 2014 +0200| [4810f7d4535fc1b82520417c76920f5ef07db4b0] | committer: Jean-Baptiste Kempf

build: add android ndk fixup: fix x86 and android-L build

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

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4810f7d4535fc1b82520417c76920f5ef07db4b0
---

 compile.sh |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/compile.sh b/compile.sh
index 9895d4d..c37cd50 100755
--- a/compile.sh
+++ b/compile.sh
@@ -314,6 +314,23 @@ else
     TARGET=
 fi
 
+# ANDROID NDK FIXUP (BLAME GOOGLE)
+config_undef ()
+{
+    sed -i 's,#define '$1' 1,/\* #undef '$1' \*/,' config.h
+}
+
+if [ ${ANDROID_ABI} = "x86" -a ${ANDROID_API} != "android-L" ] ; then
+    # NDK x86 libm.so has nanf symbol but no nanf definition, we don't known if
+    # intel devices has nanf. Assume they don't have it.
+    config_undef HAVE_NANF
+fi
+if [ ${ANDROID_API} = "android-L" ] ; then
+    # android-L has empty sys/shm.h headers that triggers shm detection but it
+    # doesn't have any shm functions and/or symbols. */
+    config_undef HAVE_SYS_SHM_H
+fi
+
 echo "Building"
 make $MAKEFLAGS
 



More information about the Android mailing list