...im not very familiar with ubuntu...but in short my thoughts...
I cannot talk about ho to configure pkg-config - but i think the Problem is as follows:
You got different versions of Libraries in your /usr/lib Directory, and i think (have a look at the man) ldconfig links the newest lib-Versions it founds to the approprieta library.
But your pkg-config (/usr/lib/pkd-config/glib-2.0.pc) says different, ldconfig found.
So the answer to your Question? - i dont know, if you compiled the 2.8 from gtk.org-sources it's problematic. If you installed from a tarball, it's problematic - i think.
But older version doesn't have to be removed i think, only if it's akin you, or just to get free space.
Why did you install 2.8 later on to 2.10 ??
Maybe the 2.10 version you cannot deinstall because it's the recommended package to your distribution-version ??
--
If so, try to reconfigure libglib2.0-dev, may be
Code:
dpkg-reconfigure libglib2.0-dev
and check what
Code:
pkg-config --modversion glib-2.0
will say...i hope that gives 2.10.3...then the configure-Script of Xchat should run, with glib-2.0 v. 2.10.3 .
regards
kickzah