[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dropping indirect dependencies from libgnutls-config --libs

On 7/3/06, Miles Bader <miles.bader@necel.com> wrote:
[Ok, I guess your autoconf script could guess that without being too ugly.]

and "pkg-config --libs OpenEXR" yields:

   -lIlmImf -lImath -lHalf -lIex -lz

[Yuck... even when using shared libraries, library dependencies don't
seem to give -lImath, I'm not sure why (maybe it's only used by inline
functions in the headers?)...]

Which is a bug in openexr. At the very least -lz shouldn't be there.
And -lHalf and -lIex are probably redundant also, since the other two
are already linked against them.

Until people get into the habit of only listing *direct* dependacies,
pkg-config is not universally useful. autoconf works out what you what
you need to link your program, and you have control over that.
pkg-config leaves you in the hands of maintainers who regularly put
the wrong thing in their .pc files.

The extra libs should only be listed if you specify --static.

Have a nice day,
Martijn van Oosterhout <kleptog@gmail.com> http://svana.org/kleptog/

Reply to: