wget http://ftp.gnu.org/pub/gnu/emacs/emacs-23.2.tar.gz
tar -xvzf emacs-23.2.tar.gz
cd emacs*.gz

if you get the error: “configure: error: You seem to be running X, but no X development libraries”

yum install gtk2-devel

sudo yum install libXpm-devel.i386 giflib-devel.i386 libtiff-devel.i386 libjpeg-devel.i386

or try:

sudo apt-get install libgtk2.0-dev libtiff4-dev libgif-dev libjpeg62-dev libpng12-dev libxpm-dev