Blame common/m4/as-compiler.m4

Packit f546b1
dnl as-compiler.m4 0.1.0
Packit f546b1
Packit f546b1
dnl autostars m4 macro for detection of compiler flavor
Packit f546b1
Packit f546b1
dnl Thomas Vander Stichele <thomas at apestaart dot org>
Packit f546b1
Packit f546b1
dnl $Id: as-compiler.m4,v 1.4 2004/06/01 09:44:19 thomasvs Exp $
Packit f546b1
Packit f546b1
dnl AS_COMPILER(COMPILER)
Packit f546b1
dnl will set variable COMPILER to
Packit f546b1
dnl - gcc
Packit f546b1
dnl - forte
Packit f546b1
dnl - (empty) if no guess could be made
Packit f546b1
Packit f546b1
AC_DEFUN([AS_COMPILER],
Packit f546b1
[
Packit f546b1
  as_compiler=
Packit f546b1
  AC_MSG_CHECKING(for compiler flavour)
Packit f546b1
Packit f546b1
  dnl is it gcc ?
Packit f546b1
  if test "x$GCC" = "xyes"; then
Packit f546b1
    as_compiler="gcc"
Packit f546b1
  fi
Packit f546b1
Packit f546b1
  dnl is it forte ?
Packit f546b1
  AC_TRY_RUN([
Packit f546b1
int main
Packit f546b1
(int argc, char *argv[])
Packit f546b1
{
Packit f546b1
#ifdef __sun
Packit f546b1
  return 0;
Packit f546b1
#else
Packit f546b1
  return 1;
Packit f546b1
#endif
Packit f546b1
}
Packit f546b1
  ], as_compiler="forte", ,)
Packit f546b1
Packit f546b1
  if test "x$as_compiler" = "x"; then
Packit f546b1
    AC_MSG_RESULT([unknown !])
Packit f546b1
  else
Packit f546b1
    AC_MSG_RESULT($as_compiler)
Packit f546b1
  fi
Packit f546b1
  [$1]=$as_compiler
Packit f546b1
])