Added more configuration smarts
Updated configure script with more header checks
Merge branch 'master' into mhe