On 04.07.2017, at 14:03, Ricardo Constantino <wiia...@gmail.com> wrote:

> On 4 July 2017 at 07:54, Reimar Döffinger <reimar.doeffin...@gmx.de> wrote:
>> On 30.06.2017, at 20:06, Ricardo Constantino <wiia...@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@ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> 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
> worked.
> 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.

Seems you found a solution, and "defeats the purpose" was exaggerated, but
be point of pkg-config is to not make assumptions on where libraries are,
and by just adding -lvorbis you hardcoded exactly such an assumption:
that libvorbis is in the same place as libvorbisenc.
Checking like your latest patch ensures that both get their proper -L options.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to