first when you retry stuff either start off with a fresh package untar or make sure you delete any files
configure.cache or like that
some rocket scientist thinks it's a good idea for configure to remember failure
first i think pkgconfig searches it's own prefix first by defautl and i'm not really sure you can change that but i might be wrong
i would put those variable exports in ~/.bash_profile
and they will get read when you log in
for imediate read in
source ~/.bash_profile
might want to log all the way back out and back in so you know the are set for all new terminals you open
beyond that it gets real tricky when you want to keep two different versions of gtk2 and freinds
but i can at least talk about the situation in general and possibly you can figure it out
tricky mainly because the package config files are all just called for instance
gtk+-2.0.pc no matter which version of gtk it points to
plus the .pc files are setup to find not the actual library names but equally generic links called things like just libpango-1.0.so.0 or libglib-2.0.so.0
but beyond that you have to think about the headers
do you have some headers in /usr/local/include now ??? if not your new headers in /usr/include killed (coppied over) the old ones ?? not sure just have to check it out
the *.pc files no doubt point to the correct headers and dependancies but only if the right .pc is being used (you might have to actually hide some old .pc files)
you can use the command "ldd" to see what libs are linked to what like
Code:
(gary) /usr/lib $ ldd libpangoft2-1.0.so
linux-gate.so.1 => (0xffffe000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x40047000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x40086000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x400b5000)
libz.so.1 => /lib/libz.so.1 (0x40156000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x40168000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x401ac000)
libdl.so.2 => /lib/libdl.so.2 (0x401b1000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x401b5000)
libc.so.6 => /lib/libc.so.6 (0x40241000)
libm.so.6 => /lib/libm.so.6 (0x40357000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x4037a000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
and even look for object references with commands like
objdump -t /usr/lib/libglib-2.0.so.0 | grep g_assert_warning
but remenber the libs contain references to other libs so you sometimes have to follow dependancies to actually find stuff.