No subject


Sat Feb 9 15:26:23 PST 2008


'pkg-config --cflags' (either from explicit shell command or as the
FOO_CFLAGS variable from PKG_CHECK_MODULES(FOO) in autoconf) via a
*_CPPFLAGS Makefile variable rather than a *_CFLAGS Makefile variable.
Would be nice to get some clarification here, since the variable-names
are a bit convoluted if I understand their meanings correctly. In
particular, the pkg-config manpage could be tweaked. It presently has:

       program: program.c
            cc program.c `pkg-config --cflags --libs gnomeui`

but compiling and linking a .c all at once is pretty rare and doesn't
help with the meanings of the two different flags. Would be better as:

       program.o: program.c
            cc -o program.o program.c `pkg-config --cflags gnomeui`

       program: program.o
            cc -o program program.o `pkg-config --libs gnomeui`

Actually, that original isn't even functionally correct, because the
Makefile target is "program" but there's no flag to cc to override the
default output of "a.out".

dan

-- 
Daniel Macks
dmacks at netspace.org
http://www.netspace.org/~dmacks



More information about the pkg-config mailing list