You can pre-answer most autoconf sections using /etc/config.site, and a system distributor can create an /usr/share/config.site[1]. It's just really hard to get right, nobody uses it effectively.
Autoconf also has a config.cache[2], which it uses to store answers to reuse across multiple of the same checks and reruns of the configure script.
Autoconf also has a config.cache[2], which it uses to store answers to reuse across multiple of the same checks and reruns of the configure script.
[1]: https://www.gnu.org/software/autoconf/manual/autoconf-2.63/h...
[2]: https://www.gnu.org/software/autoconf/manual/autoconf-2.65/h...