I'm at my wit's end, and after several days of googling and playing around with it, I've finally decided to just ask, because I just can't work it out.
I have two versions of glib installed. 2.2.3, and 2.4.0. I just installed version 2.4.0 to install gtk.
I try to install gtk, and it tells me that pkg-config has found 2.4.0 using modversion, which is fine, but it tells me that it's found 2.2.3!!! I can't find 2.2.3, and all the references to glib I can find on the system are all 2.4.0 as far as I can tell. Now I've tried to change PKG_CONFIG_PATH and LIBRARY_PATH variables to the library /usr/local/lib, and I ran ldconfig. Now this has solved the problem for the time being, but what happens when a configure file needs something in /usr/lib? I can't keep switching when they both have dependancies, and I don't want programs to fail because of it. More importantly, I can't remove the old one because it has so many dependancies, even though I can't find it!
Any tips on how to remove this bugger would be *extremely* appreciated.
From my final goal, I want one version of glib, one version of gtk, and a working system with no conflictions.

I don't ask much, do I?
Thanks for *any* help..
Karl.