go-pkg-config is a Go clone of pkg-config with no external dependencies.
Inside your ~/.profile add:
APPS=$HOME/Apps
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/X11/lib/pkgconfig:$APPS/lib/pkgconfig
export PATH=$APPS/bin:$PATH
export DYLD_LIBRARY_PATH=$APPS/lib
export C_INCLUDE_PATH=$APPS/include
Build go-pkg-config:
go build -o pkg-config main.go
cp pkg-config $HOME/Apps/bin
Now when installing some software that uses pkg-config, just use $HOME/Apps as prefix:
./configure --prefix=$HOME/Apps
make
make install