Minor extension to Mike's guide:
I used gcc6, obtained via MacPorts to compile the library and had to change a few things.
1.)
MacPorts default installation directory is /opt/local/, so the exports and alias' in your .bashrc have to be set accordingly, e.g.
alias g++=/opt/local/bin/g++-mp-6
2.)
If you didn't set your default compiler to gcc6 using
port select --set gcc gcc6
create a symlink for gfortran:
ln -s /opt/local/bin/gfortran-mp-6 /opt/local/bin/gfortran
3.)
For some reason, in my configure step, the option --with-blas was not recognized and configure threw a warning (if anyone could shed some light on why this is happening I'd be really interested!). My solution was to just omit this option in the ./configure step.
For the rest of the installation, refer to Mike's guide.
Hope this helps