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

Re: pkg-config including too much crap

On 4/4/06, Loïc Minier <lool+debian@via.ecp.fr> wrote:
>  gtk+-2.0.pc's Libs only has -lgtk, it requires gdk, atk, and cairo
>  because of grep -ir #include /usr/include/gtk-2.0 | grep -v 'atk' (it
>  needs at least the Cflags).  Some people go as far as saying that since
>  the headers are included from gtk's headers, the resulting binaries
>  should be linked against these dependency-libs.
>  Some discussion of this in #340904 and friends.

So the end result of this is that pkg-config is great for extracting
configuration info and pretty useless for determining which libs you
actually need. As a conciencous developer trying to keep your
dependancies straight, your only choices are to hard-code the library
names in your makefile or to use -Wl,--as-needed. The latter ofcourse
has the risk you might actually remove an entry you do actually depend

What we need is an option follow requires for cflags but not for libs.

Hopefully, one day....

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

Reply to: