[vlc-devel] [PATCH v2 7/9] android: fix nanf detection

Thomas Guillem tom at gllm.fr
Thu Oct 9 18:45:25 CEST 2014


---
 configure.ac         | 6 ++++++
 include/vlc_fixups.h | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 2b13d5b..1958a8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -696,6 +696,12 @@ AC_CHECK_LIB(m,lrintf, [
   AC_DEFINE(HAVE_LRINTF, 1, [Define to 1 if you have the lrintf function])
   VLC_ADD_LIBS([skins2],[-lm])
 ])
+AC_CHECK_FUNC(nanf, , [
+  AC_CHECK_LIB(m, nanf, [
+    AC_DEFINE(HAVE_NANF, 1, [Define to 1 if you have the NANF function])
+    VLC_ADD_LIBS([libvlccore],[-lm])
+  ])
+])
 
 dnl Check for dynamic plugins
 LIBDL=""
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index a4b9b2d..e515763 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -353,7 +353,7 @@ long nrand48 (unsigned short subi[3]);
 
 /* math.h */
 
-#ifdef __ANDROID__
+#ifndef HAVE_NANF
 #define nanf(tagp) NAN
 #endif
 
-- 
2.1.0




More information about the vlc-devel mailing list