diff mbox

[FFmpeg-devel,PATCHv2] configure: request explicitly enabled components

Message ID 20190128011040.30974-1-cus@passwd.hu
State New
Headers show

Commit Message

Marton Balint Jan. 28, 2019, 1:10 a.m. UTC
If we enable a component but a dependant library is disabled, then the enabled
component get silently disabled. Requesting all explicitly enabled components
allows configure to fail and show the missing dependencies instead of ignoring
our request.

For example if libdav1d is not availble ./configure --enable-decoder=libdav1d
succeeds but the libdav1d decoder will not be enabled. After the patch the
configure line will fail with the following message:
ERROR: libdav1d_decoder requested, but not all dependencies are satisfied: libdav1d

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 configure | 1 +
 1 file changed, 1 insertion(+)

Comments

Marton Balint Feb. 3, 2019, 11:46 a.m. UTC | #1
On Mon, 28 Jan 2019, Marton Balint wrote:

> If we enable a component but a dependant library is disabled, then the enabled
> component get silently disabled. Requesting all explicitly enabled components
> allows configure to fail and show the missing dependencies instead of ignoring
> our request.
>
> For example if libdav1d is not availble ./configure --enable-decoder=libdav1d
> succeeds but the libdav1d decoder will not be enabled. After the patch the
> configure line will fail with the following message:
> ERROR: libdav1d_decoder requested, but not all dependencies are satisfied: libdav1d
>
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
> configure | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/configure b/configure
> index e1412352fa..afe64bf98a 100755
> --- a/configure
> +++ b/configure
> @@ -3880,6 +3880,7 @@ for opt do
>             name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
>             list=$(filter "$name" $list)
>             [ "$list" = "" ] && warn "Option $opt did not match anything"
> +            test $action = enable && request $list
>             $action $list
>         ;;
>         --enable-yasm|--disable-yasm)
> --

Ping.

Thanks,
Marton
Bodecs Bela Feb. 5, 2019, 10:14 a.m. UTC | #2
2019.02.03. 12:46 keltezéssel, Marton Balint írta:
>
>
> On Mon, 28 Jan 2019, Marton Balint wrote:
>
>> If we enable a component but a dependant library is disabled, then 
>> the enabled
>> component get silently disabled. Requesting all explicitly enabled 
>> components
>> allows configure to fail and show the missing dependencies instead of 
>> ignoring
>> our request.
>>
>> For example if libdav1d is not availble ./configure 
>> --enable-decoder=libdav1d
>> succeeds but the libdav1d decoder will not be enabled. After the 
>> patch the
>> configure line will fail with the following message:
>> ERROR: libdav1d_decoder requested, but not all dependencies are 
>> satisfied: libdav1d
>>
>> Signed-off-by: Marton Balint <cus@passwd.hu>
>> ---
>> configure | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/configure b/configure
>> index e1412352fa..afe64bf98a 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3880,6 +3880,7 @@ for opt do
>>             name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
>>             list=$(filter "$name" $list)
>>             [ "$list" = "" ] && warn "Option $opt did not match 
>> anything"
>> +            test $action = enable && request $list
>>             $action $list
>>         ;;
>>         --enable-yasm|--disable-yasm)
>> -- 
>
> Ping.
>
I can not tell wheter this patch is correct or not technically, but the 
functionality/behaviour it provides, is the one that I assumed 
originally.  So I give one vote to use this patch.

bb

> Thanks,
> Marton
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
diff mbox

Patch

diff --git a/configure b/configure
index e1412352fa..afe64bf98a 100755
--- a/configure
+++ b/configure
@@ -3880,6 +3880,7 @@  for opt do
             name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
             list=$(filter "$name" $list)
             [ "$list" = "" ] && warn "Option $opt did not match anything"
+            test $action = enable && request $list
             $action $list
         ;;
         --enable-yasm|--disable-yasm)