[FFmpeg-devel] [PATCH 2/3] configure: use pkg-config helpers

Måns Rullgård mans
Sun Mar 6 18:34:25 CET 2011


Diego Biurrun <diego at biurrun.de> writes:

> On Sun, Mar 06, 2011 at 03:10:04PM +0000, M?ns Rullg?rd wrote:
>> Diego Biurrun <diego at biurrun.de> writes:
>> 
>> > On Sun, Mar 06, 2011 at 01:57:53PM +0000, Mans Rullgard wrote:
>> >> This makes existing pkg-config uses as well as the libsdl checks
>> >> use the new pkg-config helper functions, which should be more
>> >> robust against broken systems.
>> >> 
>> >> --- a/configure
>> >> +++ b/configure
>> >> @@ -2883,22 +2883,17 @@ check_mathfunc truncf
>> >>  # these are off by default, so fail if requested and not available
>> >>  enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
>> >>  enabled frei0r     && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
>> >> -enabled libdirac   && add_cflags $(pkg-config --cflags dirac) &&
>> >> -                      require  libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init $(pkg-config --libs dirac) &&
>> >> -                      require  libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init $(pkg-config --libs dirac)
>> >> +enabled libdirac   && require_pkg_config dirac libdirac_decoder/dirac_parser.h dirac_decoder_init
>> >
>> > IIRC (but my memory is hazy there) libdirac can be configured in both
>> > decoder-only or encoder-only mode.  Do you want to drop support for
>> > such configurations?
>> 
>> Thanks for refreshing my memory on that one.  I guess it needs a
>> slightly more elaborate check.
>
> A simple solution could be to split the libdirac check in two, one
> for decoding and one for encoding.

That would add the flags twice, which is at best unnecessary.  I have a
better idea in mind.  Stand by for an updated patch.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list