diff mbox series

[FFmpeg-devel] configure: use pkg-config for xlib/Xv

Message ID 20210714212310.26893-1-timo@rothenpieler.org
State Accepted
Headers show
Series [FFmpeg-devel] configure: use pkg-config for xlib/Xv | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Timo Rothenpieler July 14, 2021, 9:23 p.m. UTC
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Almer July 14, 2021, 9:28 p.m. UTC | #1
On 7/14/2021 6:23 PM, Timo Rothenpieler wrote:
> ---
>   configure | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index 2d2d125fd3..f5370b3ead 100755
> --- a/configure
> +++ b/configure
> @@ -6194,7 +6194,7 @@ check_func_headers windows.h Sleep
>   check_func_headers windows.h VirtualAlloc
>   check_func_headers glob.h glob
>   enabled xlib &&
> -    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
> +    check_pkg_config xlib "xv" "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute

No need for quotes if you're just checking for xv.

LGTM either way, but probably keep the existing check as fallback.

>   
>   check_headers direct.h
>   check_headers dirent.h
>
Timo Rothenpieler July 14, 2021, 9:54 p.m. UTC | #2
On 14.07.2021 23:28, James Almer wrote:
> On 7/14/2021 6:23 PM, Timo Rothenpieler wrote:
>> ---
>>   configure | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configure b/configure
>> index 2d2d125fd3..f5370b3ead 100755
>> --- a/configure
>> +++ b/configure
>> @@ -6194,7 +6194,7 @@ check_func_headers windows.h Sleep
>>   check_func_headers windows.h VirtualAlloc
>>   check_func_headers glob.h glob
>>   enabled xlib &&
>> -    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" 
>> XvGetPortAttribute -lXv -lX11 -lXext
>> +    check_pkg_config xlib "xv" "X11/Xlib.h X11/extensions/Xvlib.h" 
>> XvGetPortAttribute
> 
> No need for quotes if you're just checking for xv.
> 
> LGTM either way, but probably keep the existing check as fallback.

Did libXv ever not have a .pc file?
I had the old version as fallback first, but could not find a case where 
there was no xv.pc.
James Almer July 14, 2021, 10:02 p.m. UTC | #3
On 7/14/2021 6:54 PM, Timo Rothenpieler wrote:
> On 14.07.2021 23:28, James Almer wrote:
>> On 7/14/2021 6:23 PM, Timo Rothenpieler wrote:
>>> ---
>>>   configure | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/configure b/configure
>>> index 2d2d125fd3..f5370b3ead 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -6194,7 +6194,7 @@ check_func_headers windows.h Sleep
>>>   check_func_headers windows.h VirtualAlloc
>>>   check_func_headers glob.h glob
>>>   enabled xlib &&
>>> -    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" 
>>> XvGetPortAttribute -lXv -lX11 -lXext
>>> +    check_pkg_config xlib "xv" "X11/Xlib.h X11/extensions/Xvlib.h" 
>>> XvGetPortAttribute
>>
>> No need for quotes if you're just checking for xv.
>>
>> LGTM either way, but probably keep the existing check as fallback.
> 
> Did libXv ever not have a .pc file?
> I had the old version as fallback first, but could not find a case where 
> there was no xv.pc.

It's about not breaking a currently working check on environments that 
lack pkg-config. I know, fringe case, but if keeping this line after a 
|| prevents potential regressions, it costs nothing.

New checks can be pkg-config only just fine, it's existing ones that we 
should keep in place as fallback when adding a pkg-config variant.

> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
Timo Rothenpieler July 14, 2021, 10:32 p.m. UTC | #4
On 15.07.2021 00:02, James Almer wrote:
> On 7/14/2021 6:54 PM, Timo Rothenpieler wrote:
>> On 14.07.2021 23:28, James Almer wrote:
>>> On 7/14/2021 6:23 PM, Timo Rothenpieler wrote:
>>>> ---
>>>>   configure | 2 +-
>>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/configure b/configure
>>>> index 2d2d125fd3..f5370b3ead 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -6194,7 +6194,7 @@ check_func_headers windows.h Sleep
>>>>   check_func_headers windows.h VirtualAlloc
>>>>   check_func_headers glob.h glob
>>>>   enabled xlib &&
>>>> -    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" 
>>>> XvGetPortAttribute -lXv -lX11 -lXext
>>>> +    check_pkg_config xlib "xv" "X11/Xlib.h X11/extensions/Xvlib.h" 
>>>> XvGetPortAttribute
>>>
>>> No need for quotes if you're just checking for xv.
>>>
>>> LGTM either way, but probably keep the existing check as fallback.
>>
>> Did libXv ever not have a .pc file?
>> I had the old version as fallback first, but could not find a case 
>> where there was no xv.pc.
> 
> It's about not breaking a currently working check on environments that 
> lack pkg-config. I know, fringe case, but if keeping this line after a 
> || prevents potential regressions, it costs nothing.
> 
> New checks can be pkg-config only just fine, it's existing ones that we 
> should keep in place as fallback when adding a pkg-config variant.

Kept the old check as fallback and applied
diff mbox series

Patch

diff --git a/configure b/configure
index 2d2d125fd3..f5370b3ead 100755
--- a/configure
+++ b/configure
@@ -6194,7 +6194,7 @@  check_func_headers windows.h Sleep
 check_func_headers windows.h VirtualAlloc
 check_func_headers glob.h glob
 enabled xlib &&
-    check_lib xlib "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute -lXv -lX11 -lXext
+    check_pkg_config xlib "xv" "X11/Xlib.h X11/extensions/Xvlib.h" XvGetPortAttribute
 
 check_headers direct.h
 check_headers dirent.h