'system cflags' with other prefix
ctreleaven at cogeco.ca
Tue Jan 12 09:39:25 PST 2016
> On Jan 12, 2016, at 11:36 AM, Dan Nicholson <dbn.lists at gmail.com> wrote:
> On Jan 12, 2016 8:18 AM, "Tollef Fog Heen" <tfheen at err.no <mailto:tfheen at err.no>> wrote:
> > ]] Craig Treleaven
> > > Eg, with MacPorts:
> > > $ pkg-config --cflags x264
> > > -I/opt/local/include ## want to make this disappear since it is the ‘system include'
> > If /opt/local/include is already on the compiler search path, pkg-config
> > should be compiled with that knowledge, at which point it'll strip it
> > out, like /usr/include on Linux.
> This isn't documented (should be), but you can override pkg-config's notion of the system include path with the environment variable PKG_CONFIG_SYSTEM_INCLUDE_PATH. If that's not set, it uses the compiled in defaults. That's been in pkg-config for a long time, so it should work with the version you have. This should be in the form of a path style variable with : separators.
DING, DING, DING! We have a winner!
$ pkg-config --cflags-only-I libass
-I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/fribidi -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2
$ PKG_CONFIG_SYSTEM_INCLUDE_PATH=/opt/local/include pkg-config --cflags-only-I libass
-I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/fribidi -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/freetype2
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pkg-config