sudo apt-get install libfcgi-dev
sudo apt-get install spawn-fcgi
sudo apt-get install nginx
sudo apt-get install curl
sudo apt-get install sqlite3 (On some flavors installed by default eg; Ubuntu 16.04)
sudo apt-get install libsqlite3-dev
After installing the relevant tools, refer to the Autotools instructions for compliation and linking