1dnl as-compiler.m4 0.1.0 2 3dnl autostars m4 macro for detection of compiler flavor 4 5dnl Thomas Vander Stichele <thomas at apestaart dot org> 6 7dnl $Id: as-compiler.m4,v 1.4 2004/06/01 09:44:19 thomasvs Exp $ 8 9dnl AS_COMPILER(COMPILER) 10dnl will set variable COMPILER to 11dnl - gcc 12dnl - forte 13dnl - (empty) if no guess could be made 14 15AC_DEFUN([AS_COMPILER], 16[ 17 as_compiler= 18 AC_MSG_CHECKING(for compiler flavour) 19 20 dnl is it gcc ? 21 if test "x$GCC" = "xyes"; then 22 as_compiler="gcc" 23 fi 24 25 dnl is it forte ? 26 AC_TRY_RUN([ 27int main 28(int argc, char *argv[]) 29{ 30#ifdef __sun 31 return 0; 32#else 33 return 1; 34#endif 35} 36 ], as_compiler="forte", ,) 37 38 if test "x$as_compiler" = "x"; then 39 AC_MSG_RESULT([unknown !]) 40 else 41 AC_MSG_RESULT($as_compiler) 42 fi 43 [$1]=$as_compiler 44]) 45