Sometimes a config.log file is generated so you can grep it as it'll usually tell you what it was looking for before it kicked out the error. Then you'll want to use apt-file search xxx to try to figure out the package you need.