[FFmpeg-devel] [PATCH] configure: require pkg-config for libvorbis
wiiaboo at gmail.com
Tue Jul 4 15:03:38 EEST 2017
On 4 July 2017 at 07:54, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> On 30.06.2017, at 20:06, Ricardo Constantino <wiiaboo at gmail.com> wrote:
>> libvorbis comes with pkg-config files since at least v1.0.1, way back
>> in 2003.
>> The extra check is needed for shared builds, as the pkg-config file
>> for vorbisenc doesn't include vorbis and ogg if --static isn't used.
> If you still manually add -lvorbis that IMHO defeats the purpose of using pkg-config the first place.
> I don't know if our actual code using vorbisenc depend on libvorbis and libogg, but if it does then the flags for all 3 would have to be requested via pkg-config.
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
If the first pkg-config test fails (in case of shared), I test with
check_pkg_config with those extralibs added and then add them if it
It doesn't defeat the purpose because pkg-config is not just for the
-l flags. In my usecase I need both -I and -L flags for the proper
installation too but I didn't build with shared libraries so I never
noticed this before.
>From what I could read from the code, we do need all three libraries
as the code has references to symbols not just in vorbisenc. I don't
know if that's a problem with the code, or with how the shared
libraries are done, or if the pkg-config should just always contain
vorbis and ogg on Requires instead of Requires.private.
I can't help with any of these. The latter, even if fixed upstream
would only be available in git master, since there haven't been
libvorbis releases for years.
My solution enables usage of pkg-config with shared libraries of
libvorbis but does disable builds where pkg-config isn't available.
Alternatively, I could add a use_pkg_config version that works with
multiple .pc that would be used for libvorbis only.
More information about the ffmpeg-devel