[FFmpeg-devel] [PATCH] Add extralibs to dependency checker
Måns Rullgård
mans
Tue Sep 18 20:27:15 CEST 2007
Ramiro Ribeiro Polla <ramiro at lisha.ufsc.br> writes:
> wrote:
>> Ramiro Ribeiro Polla <ramiro at lisha.ufsc.br> writes:
>>
>>
>>> Hello,
>>>
>>> Attached patch adds _extralibs to the dependency checker. Instead of
>>> having add_extralibs throughout configure, each item that needs an
>>> extra lib can specify it. It's also good as in the network and oss
>>> cases, where some systems need extra libs and some systems don't.
>>>
>>> Ramiro Polla
>>> Index: configure
>>> ===================================================================
>>> --- configure (revision 10492)
>>> +++ configure (working copy)
>>> @@ -303,14 +303,17 @@
>>> eval dep_all="\$${cfg}_deps"
>>> eval dep_any="\$${cfg}_deps_any"
>>> + eval dep_extralibs="\$${cfg}_extralibs"
>>> - pushvar cfg dep_all dep_any
>>> + pushvar cfg dep_all dep_any dep_extralibs
>>> check_deps $dep_all $dep_any
>>> - popvar cfg dep_all dep_any
>>> + popvar cfg dep_all dep_any dep_extralibs
>>> enabled_all $dep_all || disable $cfg
>>> enabled_any $dep_any || disable $cfg
>>> + enabled $cfg && [ -n "$dep_extralibs" ] && add_extralibs
>>> $dep_extralibs
>>> +
>>> disable ${cfg}_checking
>>>
>>
>> Why the push/pop? I can't see that it serves any purpose. Rather,
>> compute dep_extralibs only after it's been determined that something
>> is to be enabled, like this:
>>
>> if enabled $cfg; then
>> eval dep_extralibs="\$${cfg}_extralibs"
>> test -n "$dep_extralibs" && add_extralibs $dep_extralibs
>> fi
>>
>
> Done.
>
>>> done
>>> }
>>> @@ -750,12 +753,14 @@
>>> # external libraries
>>> mpeg4aac_decoder_deps="libfaad"
>>> +liba52bin_decoder_extralibs='$ldl'
>>>
>>
>> Hmm... there are probably enough evals to make this actually work.
>>
>
> I don't understand what you mean. It does work though...
I mean that the value of liba52bin_decoder_extralibs must be subjected
to an eval to expand the $ldl.
> New patch attached, with sorted list. I really should make a "sort"
> plugin for kwrite...
>
> Ramiro Polla
> Index: configure
> ===================================================================
> --- configure (revision 10528)
> +++ configure (working copy)
> @@ -310,6 +310,11 @@
> enabled_all $dep_all || disable $cfg
> enabled_any $dep_any || disable $cfg
>
> + if enabled $cfg; then
> + eval dep_extralibs="\$${cfg}_extralibs"
> + test -n "$dep_extralibs" && add_extralibs $dep_extralibs
> + fi
> +
> disable ${cfg}_checking
> done
> }
> @@ -747,12 +752,14 @@
> zmbv_encoder_deps="zlib"
>
> # external libraries
> +liba52bin_decoder_extralibs='$ldl'
> liba52_decoder_deps="liba52"
Call that sorted? I don't.
> libamr_nb_decoder_deps="libamr_nb"
> libamr_nb_encoder_deps="libamr_nb"
> libamr_wb_decoder_deps="libamr_wb"
> libamr_wb_encoder_deps="libamr_wb"
> libfaac_encoder_deps="libfaac"
> +libfaadbin_decoder_extralibs='$ldl'
> libfaad_decoder_deps="libfaad"
Again.
The rest looks OK.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list