Fixing a couple of items before releasing.
[awesomized/libmemcached] / m4 / pandora_check_compiler_version.m4
1 dnl Copyright (C) 2009 Sun Microsystems, Inc.
2 dnl This file is free software; Sun Microsystems, Inc.
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 test "$SUNCC" = "yes"],[
14 CC_VERSION=`$CC -V 2>&1 | sed 1q` ],[
15 test "$CLANG" = "yes"],[
16 CC_VERSION=`$CC --version 2>&1 | sed 1q` ],[
17 CC_VERSION=""
18 ])
19 AC_MSG_RESULT("$CC_VERSION")
20 AC_SUBST(CC_VERSION)
21 ])
22
23
24 AC_DEFUN([PANDORA_CHECK_CXX_VERSION], [
25
26 dnl Check C version while at it
27 AC_REQUIRE([PANDORA_CHECK_C_VERSION])
28
29 dnl Print version of CXX compiler
30 AC_MSG_CHECKING("C++ Compiler version")
31 AS_IF([test "$GCC" = "yes"],[
32 CXX_VERSION=`$CXX --version | sed 1q` ],[
33 test "$SUNCC" = "yes"],[
34 CXX_VERSION=`$CXX -V 2>&1 | sed 1q` ],[
35 test "$CLANG" = "yes"],[
36 CXX_VERSION=`$CXX --version 2>&1 | sed 1q` ],[
37 CXX_VERSION=""
38 ])
39 AC_MSG_RESULT("$CXX_VERSION")
40 AC_SUBST(CXX_VERSION)
41 ])