We have a number of checks that detect Solaris, typically like so:
((defined(__sun) && defined(__SVR4)) || defined(__sun__))
I think it would be good to add the corresponding BUILD2_AUTOCONF_* macros similar to other platforms. It would be also good to understand how all this relates to derivatives (illumos, etc).