I may be going out on a limb here but I'm guessing you didn't install glib-2.4 with
./configure --prefix=/usr
if you just used ./configure then the glib you installed will be in /usr/local . This is a good thing. If you had installed it --prefix=/usr it would have overwritten the glib-2.2 that was already installed and many of the things that are linked against it would now be broken. Like Gnome for instance. You'd be unable to continue installing Gnome-2.6 unless you drop down to the command prompt. I've installed Gnome at the command prompt many times, but I've never successfully installed it over an older version of Gnome. Oh, except for the time I built Garnome in my home folder. However, enough about me.
What you need to do is point towards the new packages you are installing. You need to rearrange you PKG_CONFIG_PATH so it points towards /usr/local/lib/pkgconfig before /usr/lib/pkgconfig
Code:
echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" > ~/.bashrc
should fix that. Now you need to set a couple more variables to avoid some other problems
Code:
echo "export LDFLAGS=-L/usr/local/lib" > ~/.bashrc
echo "export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH" > ~/.bashrc
That will write those variables to the hidden file .bashrc in your home folder. If you want to change or delete them open ~/.bashrc in a text editor like Gedit. I think you would be very wise to do all your compiling and installing in your home folder as then your system will be safe and you won't have to reinstall Red hat. If you do decide to play it safe, alter those variables to point to wherever you decide to install your things. Good luck.