Installation of a vmod requires an installed version of Varnish Cache, including the development files. Requirements can be found in the Varnish documentation.
Source code is built with autotools:
sudo apt-get install libvarnishapi-dev || sudo yum install varnish-libs-devel ./bootstrap # If running from git. ./configure make make check # optional sudo make install