Well, this is now done! TS-1872 / https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=commit;h=c400c884
----- Original Message ----- > On May 1, 2013, at 8:39 AM, Leif Hedstrom <zw...@apache.org> wrote: > > > On 5/1/13 6:58 AM, James Peach wrote: > >> On May 1, 2013, at 12:48 AM, Igor Galić <i.ga...@brainsware.org> > >> wrote: > >> > >>> Following this basic idea here > >>> > >>> > >>> http://nadeausoftware.com/articles/2012/10/c_c_tip_how_detect_compiler_name_and_version_using_compiler_predefined_macros > >>> > >>> I'd like to add a build/base_compiler.m4 - that runs this > >>> program: > >>> > >>> # include <stdio.h> > >>> int main (void) { > >>> printf ( > >>> #if defined(__clang__) > >>> "clang" > >>> #elif defined (__GNUC__) || defined (__GNUG__) > >>> "gcc" > >>> #elif defined (__SUNPRO_C) || defined (__SUNPRO_CC) > >>> "sunproc" > >>> #elif defined (__ICC) || defined(__INTEL_COMPILER) > >>> "icc" > >>> #endif > >>> ); > >>> return 0; > >>> } > > > > > > In addition to what James said, I think order could matter here. > > Like, I suspect that ICC might define some of the gcc flags in its > > "compatibility" mode. As such, I'd imagine you ought to test for > > most specific first (e.g. icc then sunpro then clang and last gcc) > > ? > > Yeh, the order matters ... clang masquerades as GCC pretty thoroughly > > J -- Igor Galić Tel: +43 (0) 664 886 22 883 Mail: i.ga...@brainsware.org URL: http://brainsware.org/ GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE