[FFmpeg-devel] [PATCH] lavc: drop support for OpenJPEG 1.3-2.0

James Almer jamrial at gmail.com
Thu Oct 19 02:14:13 EEST 2017


On 10/18/2017 7:49 PM, Ricardo Constantino wrote:
> On 18 October 2017 at 23:22, James Almer <jamrial at gmail.com> wrote:
> 
>> On 10/18/2017 6:56 PM, Michael Bradshaw wrote:
>>> -DOPJ_STATIC was originally added to ffmpeg's configure script for
>> Windows.
>>> Unconditionally adding -DOPJ_STATIC would conflict with people who are
>>> dynamically linking. I'll look into this further. I'll start with the
>>> following:
>>>
>>> enabled libopenjpeg       && {{require_pkg_config libopenjpeg "libopenjp2
>>>> = 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
>>> -DOPJ_STATIC;} ||
>>>                               require_pkg_config libopenjpeg "libopenjp2
>>> =
>>> 2.1.0" openjpeg.h opj_version;}
>>>
>>> and see if it works for both static and dynamic builds of OpenJPEG.
>>> Unfortunately, I don't have a Windows system to test on, so if anyone can
>>> validate the above on Windows I'd appreciate it.
>>
>> I have a Windows system. With a shared version of OpenJPEG the configure
>> check seems to succeed with and without -DOPJ_STATIC, but with a static
>> version it only succeed with it.
>> Ideally, pkg-config would have something like a "Cflags.private" field,
>> but it for some reason doesn't, so it's up to us to handle this.
>>
>> It think the following should be enough:
>>
>>> enabled libopenjpeg       && { use_pkg_config libopenjpeg "libopenjp2 >=
>> 2.1.0" openjpeg.h opj_version ||
>>>                                { require_pkg_config libopenjpeg
>> "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags
>> -DOPJ_STATIC; } }
>>
>> To make sure -DOPJ_STATIC is not used unless strictly necessary.
> 
> 
> There's a few other libs that require static-only Cflags (libxml2, at
> least), so openjpeg shouldn't be different. pkgconf does support
> Cflags.private, but no one uses it.

Where did you read it's supported? All the references to
"Cflags.private" i found on google were feature requests, and i just
tried to add such a line to a pkg-config and it was ignored (using
pkg-config 0.29.2).

In any case, openjpeg had checks with this cflag in configure before
this patch. Active maintainers for the wrappers that also need this kind
of cflag should look into adding them to configure (Should be a matter
of doing the same thing i did above).


More information about the ffmpeg-devel mailing list