I complied Kermit for IBM's AIX in ~1989 as a study in "how compatible is AIX to other Unixes?" Kermit source code remains the high-water mark in my memory for how many different, incompatible, non-standard platforms one piece of software can support. More than even Unix itself, as it could also run on VMS and non-Unixes of the time. I have never in my life seen so many `#ifdef`s and such complicated "Am I running on this platform or that one? Does it have this feature or that feature? No, what about this other one? Is it HP-UX maybe? HP-UX 6? No, 7? No, 8? No, what about VMS? No, how about SunOS? No, how about Unix System III?" ...on and on, seemingly endlessly.
Kermit was an extraordinary monument to portability in an era when "portable" often meant "we have individually accommodated every incompatible system anyone has ever built or might possibly still be using, however improbably."
Which is interesting because most autoconf programs I've seen do the opposite. They have all these defines and then don't use them. Just seems like a waste of time. Cmake has been better but still sometimes cmake will pass and the code still doesn't build