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

Rémi Denis-Courmont remi at remlab.net
Thu Oct 9 19:08:50 CEST 2014


Le jeudi 9 octobre 2014, 18:45:25 Thomas Guillem a écrit :
> ---
>  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])

I know cargo cult is a popular religion among programmers, but I would prefer 
if the VLC code base remained agnostic. (*)

> +  ])
> +])
> 
>  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

(*) Please remove useless stuff.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list