Installing emacs23 with X11 support on Leopard

For some reason Fink has not yet updated their version of GNU emacs. While there are several other options, including Aquamacs, xemacs from Fink and the terminal-only emacs that comes pre-installed on OSX, I missed my traditional GNU Emacs running over X11. Luckily, with a few tweaks to this guide, the process was pretty painless — assuming you’ve already got Fink installed, just do the following (all from the Terminal):

 mkdir tmp
 cd tmp
 cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/emacs co emacs
 cd emacs
 fink install libungif libjpeg libtiff
 export LIBS="-lresolv"
 ./configure --without-carbon --with-x --prefix=/usr/local
 make bootstrap
 make
 sudo make install 
 cd /usr/local/bin/
 sudo ln -s emacs emacs23