Revert "Remove more autoconf cruft"

This reverts commit f69f641ee91fe524b4bb47220472cabcd712207f.