I was having some problems compiling gtk20 on a FreeBSD 4 box at work today. Having finally sorted it, this note is for Google to find so the next person doesn't have to debug it all over again.
The problem was the configure script failing to detect pango. There was a misleading error message gnome-config not found, which had me chasing three year old Google hits for an hour, until figuring out that gnome-config is only for Gnome version 1. pkg-config falls back to it to keep compatibility.
The library it fails to find is in fact libpangocairo — specifically, this library didn't get built, and so there is no pangocairo.pc for pkg-config to find. cairo was built, so pango must have missed it. It turned out that the test for cairo had failed, because cairo needs threads, but cairo.pc doesn't list libc_r (FreeBSD 4's threading library) as a dependency (probably because I am the only person daft enough to compile something as modern as cairo on such an old system).
So, recompile cairo; interrupt the build and edit cairo.pc, adding -lc_r to the libs; finish the compile, make deinstall reinstall, and rebuild from pango onwards. Solved.