autoconf should require GCC unless explicitly overridden
Darshan should always be built with GCC on Linux since it provides the most portability when linked against other applications. For users who know what they are doing and want to compile with a non-GCC compiler, there should be an explicit
--without-gcc (or something) configure option that allows this behavior.
Looking around the Internet, it looks like the solution would be something like
#if defined(__GNUC__) && !defined(__clang__)
because both GCC and clang expose
__GNUC__. Might want to check the common HPC compilers (Intel, PGI, Cray) to ensure that they aren't also flying a false flag like this.