This is how I installed MESA, following the getting started instructions, but without the software development kit (since I didn't like duplicating the compilers, etc., I have installed anyway).

Prerequisites (for Debian/Ubuntu): build-essential, gfortran, pgplot5, libX11-dev, libpng-dev, subversion
(let me know if anything is missing; note that to get pgplot5, you need to ensure "non-free" in Debian or "universe" in Ubuntu are enabled).

Download mesa in some location INSTALLATIONPATH (will make a subdirectory mesa):

cd INSTALLATIONPATH
svn co -r 4798 svn://svn.code.sf.net/p/mesa/code/trunk mesa
mv mesa/utils/makefile_header mesa/utils/makefile_header_mesasdk
mv mesa/utils/makefile_header_non_mesasdk mesa/utils/makefile_header
Edit mesa/utils/makefile_header and: Then,
cd mesa
./clean
export OMP_NUM_THREADS=NUMBEROFCORES
./install
Here, NUMBEROFCORES is whatever your machine has (can be 1, of course). Finally, to ensure mesa can finds its data files and make plots, enter the following in your .bashrc (or the equivalent in .tcsh):
export MESA_DIR=INSTALLATIONPATH/mesa
export PGPLOT_DIR=/usr/lib/pgplot5
And now off to try the examples as given on How to use MESA star!