Incompatibility w/ Automake

Stepan Kasal skasal at redhat.com
Wed Dec 12 08:22:49 PST 2007


Hello,

I'd like to discuss the following problem:

When using Automake, the -I and -D options should go to *_CPPFLAGS,
while only the rest should go to *_CFLAGS.
Likewise -l and -L options go to *_LDADD or *_LIBADD, the rest to
*_LDFLAGS.

While the pkg-config program is getting some support for this
(--libs-only-l, --cflags-only-I, etc.), some problems remain:

1) --cflags-only-D is probably also needed.

2) "pkg-config --libs-only-l --libs-only-L" could list both -l and
-L options, so that pkg-config does not have to be called twice.
(Looking at the command, --libs-l and --libs-L might actually be
better names, if it is not too late to rename.)

3) PKG_CHECK_MODULES, which is the most used interface to pkg-config,
still is not aware about the problem.  We need a new, incompatible
macro.  Shall it have a new name?  If not, shall it have another
number of parameters?

Any hints about how the new interface should look like and how the
transition should be handled is very welcome.

I can help with implementation, I can clearly see the problems, but I
do not have a clear vision how things should eventually look like,
least how to get there.

Happy hacking,
	Stepan Kasal

PS: Be tolerant if you think this complaint is not helpful enough.
I hope it was step forward to send this mail insted of mumbling to my
pocker, anyway.


More information about the pkg-config mailing list