cairo is not necessary, but it's always good to have.
Anyway, if you installed all the dependencies from source, using "./configure, make, make install", then everything is installed under /usr/local. One solution is to copy the *.pc files (of the software you've installed) from /usr/local/lib/pkgconfig to /usr/lib/pkgconfig, or run:
before running ./configure. Or you can re-install the dependencies using "./configure --prefix=/usr"