There is a prebuilt solaris binary tarball available opt-gm2-4.1.2-2011-04-09.tar.gz. This was built using the following configure script against the following source tarball. The binary tarball must reside under the /opt directory, due to a current gm2 restriction. So you could install it using the following commands:
$ cd /opt $ sudo wget http://floppsie.comp.glam.ac.uk/download/m2/binaries/solaris/opt-gm2-4.1.2-2011-04-09.tar.gz $ sudo tar zxf opt-gm2-4.1.2-2011-04-09.tar.gz $ sudo rm opt-gm2-4.1.2-2011-04-09.tar.gz