[linux-elitists] Yet more GNOME [Was: DOTGNU]
Thu Jan 3 08:54:58 PST 2002
<quote who="Ben Woodard">
> So why is it that gnome applications run little utilities like
> 'gnome-config' and 'glib-config' as opposed to just adding a bunch of
> lines to the autoconf script. I never understood that.
We're now shelving library-specific scripts, and using pkg-config. This
document (in development) explains how these scripts are used (section 3.1):
That doesn't really explain the rationale though. (Cue gathering of sane
information from Real Hackers.) Short summary: It saves you from writing
(and sitting through) drecks of repeated auto* foo, and helps with
cross-platform installation issues.
That's the contentless overview, because firstly I'm not the best person to
ask and secondly Owen Taylor said I could paste the following... ;)
<owen> jdub: Well, the two ways auto* could grok it would be:
<owen> a) call gtk-config or pkgc-config :-)
<owen> b) Repeat all the tests from glib/gtk+/.......
<owen> b) Isn't very attractive, and in some cases the correct flags do in
fact depend on _how_ gtk+ (say)was compiled so it isn't even really possible
<owen> jdub: It allows you to right programs that can be portably compiled
across different system configuratios, different versions of the base
libraries (glib headers moved between 1.2.8 and 1.2.9 and if you weren't
useing glib-config, you were more screwed than ever) and different operating
<owen> jdub: autoconf can't automatically, say "hey, my GTK+ was compiled
with Xinput support, so I need -lXi onthe link line"
<owen> jdub: so we've addded knowledge about GTK+ to autoconf. And the way
that the new autoconf support works is by calling gtk-config
<owen> jdub: In gnome-2.0 we have a autoconf macro PKG_CHECK_MODULES() that
by using pkg-config generically adds knowledge about all sorts of packages
<jdub> owen: mostly this is required due to the depth of library
<owen> jdub: No, this would be required if you were using glib by itself and
<owen> jdub: It's just a better way of doing things and has been copied by
all sorts of projects that have nothing to do with gnome -- freetype-config,
You can generally find answers to these things in #gnome, you just need to
be a little persistent at times. [ and make sure everyone knows you're not
saying, "HEY THIS SUCKS WHY DO YOU DO THIS? HUH?" :) ]
Web development with PHP is like injecting pure rust with a
high-pressure hose. For pain relief.
More information about the linux-elitists