Suggestion: Load specified .pc file / .pc parser

Tollef Fog Heen tfheen at err.no
Tue Dec 17 01:02:39 PST 2013


]] Kevin Ingwersen 

> The problem is, that I will not know where the user installed the
> application itself, hence, I can not just recompile pkg-config on the
> fly - so I need to be able to „dynamicaly“ load a pkg-config file to
> query it for information.

pkg-config --variable=foo /path/to/file.pc

> Also, I was wondering if there is a way to otherwise parse .pc
> files. As the assignment syntax is mixed (colon token and equal token)
> I can’t just apply it straight away into a PHP script or another C
> source - I have never been really good with writing parsers ^^; So I
> was wondering if there was a .pc-parser already available?

There's one inside pkg-config itself, obviously.  I'm not sure it's
worth the effort to make it into a library.

-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


More information about the pkg-config mailing list