Merge Trond
[m6w6/libmemcached] / m4 / pandora_check_compiler_version.m4
1 dnl Copyright (C) 2009 Sun Microsystems
2 dnl This file is free software; Sun Microsystems
3 dnl gives unlimited permission to copy and/or distribute it,
4 dnl with or without modifications, as long as this notice is preserved.
5
6
7 AC_DEFUN([PANDORA_CHECK_C_VERSION],[
8
9 dnl Print version of C compiler
10 AC_MSG_CHECKING("C Compiler version--$GCC")
11 AS_IF([test "$GCC" = "yes"],[
12 CC_VERSION=`$CC --version | sed 1q`
13 ],[AS_IF([test "$SUNCC" = "yes"],[
14 CC_VERSION=`$CC -V 2>&1 | sed 1q`
15 ],[
16 CC_VERSION=""
17 ])
18 ])
19 AC_MSG_RESULT("$CC_VERSION")
20 AC_SUBST(CC_VERSION)
21 ])
22
23
24 AC_DEFUN([PANDORA_CHECK_CXX_VERSION], [
25 dnl Print version of CXX compiler
26 AC_MSG_CHECKING("C++ Compiler version")
27 AS_IF([test "$GCC" = "yes"],[
28 CXX_VERSION=`$CXX --version | sed 1q`
29 ],[AS_IF([test "$SUNCC" = "yes"],[
30 CXX_VERSION=`$CXX -V 2>&1 | sed 1q`
31 ],[
32 CXX_VERSION=""
33 ])
34 ])
35 AC_MSG_RESULT("$CXX_VERSION")
36 AC_SUBST(CXX_VERSION)
37 ])