[FFmpeg-devel] [PATCH] configure: make pkgconfig_generate() fills Libs if shared is not set

Stefano Sabatini stefano.sabatini-lala
Tue Sep 15 00:50:50 CEST 2009

Hi all again!

We know pkgconfig sucks:

and yet we are lazy / wise / boring enough to eschew ourself another
world-save and implement something better at the level of the linker.

Nonetheless, as long as we have to strive in this world, it's a good
idea to keep pkgconfig meta-info files sound and working.

I noticed that when I didn't explicitely set in my configure:

shared libraries are not generated, the resume print at the end of
configure tells:
shared no

and yet the command:
disabled shared

is false. This is because if shared is not defined, both:
disabled shared
enabled shared

evaluate to false.

As a consequence of this, the Libs line in the generated .pc files:
Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)

will not contain the libraries to link.

My suggestion is to change the logic in pkgconfig_generate(), so that
we'll have the .pc files generated with a plain configure working,
rather than require the user to explicitely set: --disable-shared.

Note: maybe an even better solution would be to make:
disabled foo

to evaluate to true if foo is different from "no" (for example if it
has not been defined).

FFmpeg = Fiendish Funny Mind-dumbing Portentous Energized Governor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-pkgconfig-generate.patch
Type: text/x-diff
Size: 570 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090915/9bb9c521/attachment.patch>

More information about the ffmpeg-devel mailing list