It's been a while since I ran a build with #autoconf / #autotools. I had forgotten just how many different little things it checks for.
One of the main things it's checking for is whether certain headers and functions exist. That reminds me: #Rust `cfg` directives really ought to allow a predicate of “such-and-such function/type/whatever exists”. Then you can, for example, call a libc function that exists only on platforms that have it, with fallback on platforms that don't.