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

Måns Rullgård mans
Sun Mar 6 16:10:04 CET 2011


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.

>> @@ -2923,10 +2918,7 @@ if enabled libdc1394; then
>>  
>> -SDL_CONFIG="${cross_prefix}sdl-config"
>> -if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
>> -    sdl_cflags=$("${SDL_CONFIG}" --cflags)
>> -    sdl_libs=$("${SDL_CONFIG}" --libs)
>> +if check_pkg_config sdl SDL.h SDL_Init; then
>>      check_func_headers SDL.h SDL_Init $sdl_cflags $sdl_libs &&
>>      check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
>>      enable sdl &&
>
> Dropping support for sdl-config looks like a separate issue to me.
> Why do you drop it?

Long answer:  http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/128348
Short answer: it sucks more than pkg-config

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



More information about the ffmpeg-devel mailing list