X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=m4%2Fpandora_check_compiler_version.m4;h=f490ef27b06fe1b4ce6ccfb9a8dfd952d28806dd;hb=21f850c451cb7db8a0085ddcc892290ecac859eb;hp=ab7c6718bf45f9ed1899e3c055ee96d754def356;hpb=d6524995788ff698a0275284f3df4adfec8b6c67;p=awesomized%2Flibmemcached diff --git a/m4/pandora_check_compiler_version.m4 b/m4/pandora_check_compiler_version.m4 index ab7c6718..f490ef27 100644 --- a/m4/pandora_check_compiler_version.m4 +++ b/m4/pandora_check_compiler_version.m4 @@ -1,37 +1,41 @@ -dnl Copyright (C) 2009 Sun Microsystems -dnl This file is free software; Sun Microsystems +dnl Copyright (C) 2009 Sun Microsystems, Inc. +dnl This file is free software; Sun Microsystems, Inc. dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([PANDORA_CHECK_C_VERSION],[ - dnl Print version of C compiler - AC_MSG_CHECKING("C Compiler version--$GCC") - AS_IF([test "$GCC" = "yes"],[ - CC_VERSION=`$CC --version | sed 1q` - ],[AS_IF([test "$SUNCC" = "yes"],[ - CC_VERSION=`$CC -V 2>&1 | sed 1q` - ],[ + dnl Print version of C compiler + AC_MSG_CHECKING("C Compiler version--$GCC") + AS_IF([test "$GCC" = "yes"],[ + CC_VERSION=`$CC --version | sed 1q` ],[ + test "$SUNCC" = "yes"],[ + CC_VERSION=`$CC -V 2>&1 | sed 1q` ],[ + test "$CLANG" = "yes"],[ + CC_VERSION=`$CC --version 2>&1 | sed 1q` ],[ CC_VERSION="" + ]) + AC_MSG_RESULT("$CC_VERSION") + AC_SUBST(CC_VERSION) ]) - ]) - AC_MSG_RESULT("$CC_VERSION") - AC_SUBST(CC_VERSION) -]) AC_DEFUN([PANDORA_CHECK_CXX_VERSION], [ - dnl Print version of CXX compiler - AC_MSG_CHECKING("C++ Compiler version") - AS_IF([test "$GCC" = "yes"],[ - CXX_VERSION=`$CXX --version | sed 1q` - ],[AS_IF([test "$SUNCC" = "yes"],[ - CXX_VERSION=`$CXX -V 2>&1 | sed 1q` - ],[ - CXX_VERSION="" - ]) + + dnl Check C version while at it + AC_REQUIRE([PANDORA_CHECK_C_VERSION]) + + dnl Print version of CXX compiler + AC_MSG_CHECKING("C++ Compiler version") + AS_IF([test "$GCC" = "yes"],[ + CXX_VERSION=`$CXX --version | sed 1q` ],[ + test "$SUNCC" = "yes"],[ + CXX_VERSION=`$CXX -V 2>&1 | sed 1q` ],[ + test "$CLANG" = "yes"],[ + CXX_VERSION=`$CXX --version 2>&1 | sed 1q` ],[ + CXX_VERSION="" + ]) + AC_MSG_RESULT("$CXX_VERSION") +AC_SUBST(CXX_VERSION) ]) - AC_MSG_RESULT("$CXX_VERSION") - AC_SUBST(CXX_VERSION) -])