pkg-config


If you are a guy like me who wants gtk-related stuff in /opt pkg-config gets pretty annoying if you do not know how it works.

What it is

pkg-config is simply a database (in text) for installed packages (glib,gtk,etc...).

Install

./configure --prefix=/opt/pkgconfig
make && make install
ln -s /opt/pkgconfig/bin/* /usr/local/bin
mkdir /opt/pkgconfig/lib						# These dirs are not created by default
mkdir /opt/pkgconfig/lib/pkgconfig

-- then if you install glib in /opt/gtk2
./configure --prefix=/opt/gtk2
make && make install
ln -s /opt/gtk2/bin/* /usr/local/bin

ln -s /opt/gtk2/
ln -s /opt/gtk2/lib/pkgconfig/* /opt/pkgconfig/lib/pkgconfig		# This will add the info about glib to pkg-config

Links

http://www.freedesktop.org/software/pkgconfig/
Author Per-Olof Pettersson