Initial release
[adaptation/ap_samsung/gst-plugins-s5pc2xx.git] / common / m4 / as-compiler.m4
1 dnl as-compiler.m4 0.1.0
2                                                                                 
3 dnl autostars m4 macro for detection of compiler flavor
4
5 dnl Thomas Vander Stichele <thomas at apestaart dot org>
6
7 dnl $Id: as-compiler.m4,v 1.4 2004/06/01 09:33:45 thomasvs Exp $
8                                                                                 
9 dnl AS_COMPILER(COMPILER)
10 dnl will set variable COMPILER to
11 dnl - gcc
12 dnl - forte
13 dnl - (empty) if no guess could be made
14
15 AC_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([
27 int 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 ])