I forgot another good example of portability *mostly* minus ifdef, mainly plan9ports. This is the full set of plan 9 tools, including graphics tools like the rio window manager, and it's pretty much ifdef-free.
I just did a quick grep for ifdef and it's basically
ifdef cplusplus
in some include files, which seems unavoidable nowadays, and of course anything imported from elsewhere has the usual pile of ifdefs.
the configure script is just
echo read the README file
same for Makefile.
To build, you just run an INSTALL script which builds it all. Compilers are fast. Makefile errors are avoided by just building it all, each time.
Would that the gnubin tools had learned these lessons.