Extensions to .pc files

Dan Nicholson dbn.lists at gmail.com
Mon Jun 15 13:31:38 PDT 2009

On Sat, Jun 6, 2009 at 9:20 PM, Brad Hards<bradh at frogmouth.net> wrote:
> Hi,
> I'd like to ask for an opinion on the best way to manage extensions to the
> normal contents of a .pc file.
> Conceptually, I'd like to be able to get back a path to a particular
> configuration / script file, which I'm going to (optionally) add to my
> command line to make the compiler do something different.
> [The example here is dehydra, which is a static analysis tool from mozilla
> that works with gcc and javascript files to provide compile-time checks. So
> if a library provides a set of checks as "libfoo-check.js", I'd like
> pkg-config to be able to tell me if there is such a set of checks, and where
> they can be found.]
> I considered using the --variable command line option, but it seemed somehow
> inconsistent to use it for this. Setting variables also uses a different
> syntax, which isn't ideal:
> Libs: -lfoo
> Cflags: -I${includedir}
> dehydra_script={prefix}/share/libfoo-dehydra-check.js
> dehydra_insert_after=useless

Lots of people already use the --variable support, and they are meant
to be freeform. Is there any reason --variable=dehdrya_script wouldn't
work? pkg-config should resolve all the variables to expand it.


More information about the pkg-config mailing list