How to solve dependencies for sources

Example: You want to compile a software, lets say CouchDB 1.0. But ./configure list a lot of missing other software and/or libraries.

Tip: install an old source package

If there is an older version of the same software, lets say CouchDB 0.8, then try to install and compile the old package. You will get an error message what packages are missing. Then, you can install than with apt-get.