I have a bunch of libraries installed with homebrew but I don't know what the right way to get them in pkg-config's search path. Right now I have
export PKG_CONFIG_PATH=$(find /usr/local/Cellar -name 'pkgconfig' -type d | grep lib/pkgconfig | tr '\n' ':' | sed s/.$//)
This works fine, but it does slow down my shell startup time, which now takes about 2 seconds. I'm sure that there's a better way built into homebrew, but I can't find it in the docs.