Autoconf cleanup patches, this time properly rebased