digiKam requires a lot of libraries. So, before compiling yourself digiKam, you'll have to download and install them.
To get an up to date dependencies list, check this file.
If you are using a distribution based on apt-get (Ubuntu, debian, ...), an easy way to install the dependencies is to use the commands:
sudo apt-get build-dep digikam
sudo apt-get build-dep kipi-plugins