[Expat-discuss] [PATCH] Add pkg-config support
dbn.lists at gmail.com
Tue Jul 10 15:56:27 CEST 2007
On 7/10/07, Karl Waclawek <karl at waclawek.net> wrote:
> Enrico Weigelt wrote:
> > Aehm, what happend to my pkg-conf patch from Oct'06 ?
> I am not familiar with this tool, so I didn't respond.
> Maybe you attach your solution to the recent bug as well, and discuss
> with the others which is best.
> Let's see what you guys come up with.
I never found any old patch, so I just generated a new one. It's
pretty simple, but I'd be interested in seeing what you came up with.
Karl, just as an example of why people use pkg-config is that it has
very good integration with autoconf. Linking to libexpat while
checking the version would be simple:
PKG_CHECK_MODULES(EXPAT, expat >= 2.0.1, have_expat=true, have_expat=false)
This macro is shipped with pkg-config. The results are stored in
EXPAT_LIBS and EXPAT_CFLAGS. That would make linking with expat in
non-standard locations trivial.
Currently, you have to do something like this (from dbus):
[ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
That works, but it doesn't check versions or store any info about
directory prefixes in -I or -L. Anything like that is custom shell and
prone to errors.
More information about the Expat-discuss