configure automake with nostdinc (cherry picked from commit 95f131da2d741f4ad13c2c045253dc2b80b03f40)