>checking for X...configure: error: Can't find X includes.

apt-get install xorg-dev

You may need additional packages, but you definitly want this.