[FFmpeg-devel] [PATCH] Implement CPP condition check support in configure

Stefano Sabatini stefano.sabatini-lala
Thu Oct 2 23:36:49 CEST 2008


On date Wednesday 2008-10-01 12:25:11 +0200, Dominik 'Rathann' Mierzejewski encoded:
> On Wednesday, 01 October 2008 at 10:35, M?ns Rullg?rd wrote:
> > Diego Biurrun <diego at biurrun.de> writes:
> > 
> > > On Wed, Sep 24, 2008 at 10:40:26PM +0200, Stefano Sabatini wrote:
> > >> --- configure	(revision 15400)
> > >> +++ configure	(working copy)
> > >> @@ -608,6 +620,16 @@
> > >>  
> > >> +require3(){
> > >> +    name="$1"
> > >> +    header="$2"
> > >> +    func="$3"
> > >> +    cpp_condition="$4"
> > >> +    shift 4
> > >> +    check_lib $header $func "$@" || die "ERROR: $name not found"
> > >> +    check_cpp_condition $header "$cpp_condition" || die "ERROR: $name does not satisfies CPP condition: $cpp_condition"
> > >> +}
> > >
> > > I wonder if another require function is necessary.  You could simply run
> > > two checks for libx264...
> > 
> > Yes, this is getting a bit specialised, and it would only be used in
> > one place.

Check the patch below, I also considered to have just a single
require_cpp_condition but then it would be inconsistent with the other
require functions (as far as I can see log is only used in check_*
functions), also it would look less modular.

> > That said, I'm still not convinced of the need to test the x264 version.
> 
> It's always better to tell the user that their x264 is too old as soon as we
> can determine that rather than failing in the middle of compilation.

+1, that's the point of it.

Regards.
-- 
FFmpeg = Forgiving and Freak Majestic Picky Evangelical Guru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-cpp-condition-02.patch
Type: text/x-diff
Size: 1524 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081002/e550374d/attachment.patch>



More information about the ffmpeg-devel mailing list