[MPlayer-dev-eng] [PATCH] fix configure check for faad2 on systems which have a different prototype for lrintf

Diego Biurrun diego at biurrun.de
Thu Jun 30 11:23:15 CEST 2005


On Sat, Jun 25, 2005 at 07:46:20PM +0200, Bernd Ernesti wrote:
> 
> here is a patch to fix a problem with the following configure test:
> 
>   Checking for internal FAAD2 (AAC) support
> 
> This will fail if you run configure for the first time after a new checkout,
> because at this point a correct config.h doesn't exists, which would have an
> #define HAVE_LRINTF 1
> if the configure script found a working lrintf on that system.
> 
> Now, the faad2 check tries to compile libfaad2/common.h while including config.h,
> which has a different asumption on how the lrintf function should be called:
> 
> static INLINE int lrintf(float f)
> 
> which will fail on NetBSD because we have the follwing in <math.h>:
> 
> long int lrint(double);
> 
> The work around this problem is to not only create an empty config.h, but
> to print the value of $_def_lrintf to it, so the faad2 check would not longer
> fail with this:
> 
> cc  -I/usr/pkg/include    -L/usr/pkg/lib -Wl,-R/usr/pkg/lib /tmp/mplayer-conf--3548.c -o /tmp/mplayer-conf--3548.o -c -O4 -march=pentium3 -mcpu=pentium3 -pipe -ffast-math -fomit-frame-pointer -I/work/libfaad2
> In file included from /work/libfaad2/common.h:373,
>                  from /tmp/mplayer-conf--3548.c:37:
> /usr/include/math.h:313: error: conflicting types for `lrintf'
> /work/libfaad2/common.h:348: error: previous declaration of `lrintf'

Applied by Jindrich in a different commit.

> P.S. Diego, that was the problem which i mentioned today to you.
>  I had a different patch where I just did an
> -    static INLINE int lrintf(float f)
> +    static long INLINE int lrintf(float f)
> in libfaad2/common.h, but I don't know if that would work on other systems
> and so I made the attached patch.

OK.  Please also send me some SSA samples so I can check/apply that
patch.

Diego




More information about the MPlayer-dev-eng mailing list