## Install prerequisites to build Varnish and configure system pathsudo port install automake libtool pkgconfig pcreexport PATH="/opt/local/bin:/opt/local/sbin:$PATH"## Make sure ~/src exists and then downloads and extracts Varnish there (change as required)mkdir -p ~/src && cd ~/srcwget "http://downloads.sourceforge.net/project/varnish/varnish/2.1.3/varnish-2.1.3.tar.gz"tar xvzf varnish-2.1.3.tar.gz && cd varnish-2.1.3## Build Varnish with it's install location as /opt/local/ (change as required)## For example, varnishd will be installed to /opt/local/sbin/ for neatness./autogen.sh./configure --prefix=/opt/local && makesudo make install