[gnutls-dev] pkg-config file for libgnutls

Andreas Metzler ametzler at downhill.at.eu.org
Tue Feb 20 16:30:39 CET 2007


On 2007-02-20 Simon Josefsson <simon at josefsson.org> wrote:
> Andreas Metzler <ametzler at downhill.at.eu.org> writes:

> >> Which leads to, on my Debian box:
> >
> >> jas at mocca:~$ pkg-config --libs gtk+-2.0
> >> -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
> >> jas at mocca:~$
> >
> >> Note that even '-lm' and '-lX11' is there.  IIRC, the gtk people
> >> invented pkg-config, so they should hopefully use the best practice.
> >
> > Afaik that is because
> > a) gtk *does* expose and require the atk
> > (/usr/include/gtk-2.0/gtk/gtkaccessible.h) and cairo
> > (/usr/include/gtk-2.0/gdk/gdkcairo.h) APIs/headers

> I see your point, but I'm not sure it holds for gtk.  Does gtk, or one
> of its dependencies, also expose the -lm, -lX11, -lpango etc APIs?

Yes, they do.

gtk.h includes gdk/gdk.h. --> gtk+-2.0.pc Requires: gdk-${target}-2.0
gtkwidget.h includes atk/atkobject.h --> gtk+-2.0.pc Requires: atk
gdkx.h includes X11/Xlib.h --> gdk-x11-2.0.pc needs Requires: x11

etc. ad nauseam, grep is your friend. ;-)

I tend to think the Requires on cairo should not be there. (Not that
it makes any difference gdk-x11-2.0.pc rightfully requies it.)

The -lm is caused by brokenness in gdk-pixbuf-2.0.pc
(just Libs: instead of splitting into Libs: and Libs.private)

[...]
> Ah, maybe fixing that bug is the real solution.  Then gnutls could
> have:

> Requires.private: libtasn1

> and no 'Requires:'.
[...]


gnutls is not in the same boat as gtk*. None of gnutls headers include
headers from tasn. Requires are not necessary for gnutls.

cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'



More information about the Gnutls-dev mailing list