I have met the same question. My solution to this is just to remove ./config.cache in every sub-directories and try again. This solution is effective although I am not sure about it. Anyone could confirm or deny this.I think "make distclean" should be done before ./configure if the option of configure is changed.
rm -rf <target directory> also works. -eric