[FFmpeg-devel] [PATCH] Add log2 check to configure and equivalent to internal.h
Reimar Döffinger
Reimar.Doeffinger
Sat Jul 11 11:15:09 CEST 2009
On Sat, Jul 11, 2009 at 12:18:03AM +0100, M?ns Rullg?rd wrote:
> Alex Converse <alex.converse at gmail.com> writes:
>
> > Hi,
> >
> > If someone on a system without log2 could test this, that would be great.
> >
> > Regards,
> > Alex Converse
> >
> > diff --git a/configure b/configure
> > index 7998273..48630f1 100755
> > --- a/configure
> > +++ b/configure
> > @@ -911,6 +911,7 @@ HAVE_LIST="
> > libdc1394_1
> > libdc1394_2
> > llrint
> > + log2
> > loongson
> > lrint
> > lrintf
> > @@ -2078,7 +2079,7 @@ check_lib math.h sin -lm
> > check_lib va/va.h vaInitialize -lva
> >
> > # test for C99 functions in math.h
> > -for func in llrint lrint lrintf round roundf truncf; do
> > +for func in log2 llrint lrint lrintf round roundf truncf; do
> > check_exec <<EOF && enable $func || disable $func
> > #include <math.h>
> > int main(void) { return ($func(3.999f) > 0)?0:1; }
>
> What's with that weird runtime check anyway? Looks pretty useless to
> me.
Not sure if I understand you right, but if the compiler optimizes away
the function call it wouldn't be a good way to check if the function is
available...
More information about the ffmpeg-devel
mailing list