well i had the same problem while i was installing the gtk+2.2.4
and found a very good solution in this thread in other mailing list:
But if you don't want to read it and just want a fast solution, i'll paste here the basic steps.
# tar -xvzf jpegsrc.v6b.tar.gz
# cd jpeg-6b
# ./configure --prefix=/usr
# make test
# make install
# make install-lib
Of course you must have installed all the other dependencies of gtk.