Installing nALFS on LFS

Lee Saferite lee.saferite at
Mon May 6 13:55:05 PDT 2002

On Mon, 6 May 2002 12:25:14 +0200
Neven Has <haski at sezampro.yu> wrote:

> On Mon, May 06, 2002 at 10:39:49AM +0200, Lee Saferite wrote:
> >    Why are you using xml2-config?  just use the autoconf macros that
> >    use pkg-config.
> > 
> >   
> > IF-N OT-FOUND]])
> I can't find any info about this one. Also, grepping for "-config"
> doesn't give anything useful.
> Neven
> -- 
> Unsubscribe: send email to listar at
> and put 'unsubscribe alfs-discuss' in the subject header of the
> message

Well, if you have the pkgconfig (pkg-config) program installed, you get
a pkg.m4 macro file the defines the PKG_CHECK_MODULES macro.  You then
use it like this:

PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.0)
PKG_CHECK_MODULES(XML2, libxml-2.0 >= 'what version you want')

then you get, if the packages are installed, GTK_CFLAGS, GTK_LIBS,
XML2_CFLAGS, XML2_LIBS defined with the appropriate info.  basically it
does the EXACT same thing as xml2-config, but it is one program used for
lots of packages.  Each package has a file called 'pkgname'.pc
(gtk+-2.0.pc, xml2.pc) in the pkgconfig dir, on my system this is
/usr/local/lib/pkgconfig.  Here is the .pc for libxml-2.0:



Name: libXML
Version: 2.4.17
Description: libXML library version2.
Libs: -L${libdir} -lxml2 -lpthread -lz -lm 
Cflags: -I${includedir}/libxml2 


you can even override the variables that are defined inside the .pc
file, using some commandline args.

Overall, if the package you are depending on happens to use pkg-config,
I think it is better to use this.  these are the ones that my system has
right now:

atk.pc                  gdk.pc          gthread-2.0.pc   pango.pc
atkmm-1.0.pc            gdkmm-2.0.pc    gthread.pc       pangoft2.pc
audiofile.pc            glib-2.0.pc     gtk+-2.0.pc      pangomm-1.0.pc
esound.pc               glib.pc         gtk+-x11-2.0.pc  pangox.pc
gdk-2.0.pc              glibmm-2.0.pc   gtk+.pc          pangoxft.pc
gdk-pixbuf-2.0.pc       gmodule-2.0.pc  gtkmm-2.0.pc     pygtk-2.0.pc
gdk-pixbuf-xlib-2.0.pc  gmodule.pc      libglade-2.0.pc  sigc++-1.2.pc
gdk-x11-2.0.pc          gobject-2.0.pc  libxml-2.0.pc

Enough for now.  =)
Unsubscribe: send email to listar at
and put 'unsubscribe alfs-discuss' in the subject header of the message

More information about the alfs-discuss mailing list