From 2df622fd143e7721c67c403cd372b5bb13580431 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 19 Apr 2006 11:11:10 +0000 Subject: detect ICC and pass on "-we 147" so that the configure checks for function arguments work properly - and the option is not harmful for the rest of the curl build either! --- acinclude.m4 | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 546c373d6..2b3bb34a8 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -5,7 +5,7 @@ # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # -# Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. +# Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms @@ -1105,12 +1105,44 @@ fi ]) +dnl ********************************************************************** +dnl CURL_DETECT_ICC ([ACTION-IF-YES]) +dnl +dnl check if this is the Intel ICC compiler, and if so run the ACTION-IF-YES +dnl sets the $ICC variable to "yes" or "no" +dnl ********************************************************************** +AC_DEFUN([CURL_DETECT_ICC], +[ + ICC="no" + AC_MSG_CHECKING([for icc in use]) + if test "$GCC" = "yes"; then + dnl check if this is icc acting as gcc in disguise + AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER], + dnl action if the text is found, this it has not been replaced by the + dnl cpp + ICC="no", + dnl the text was not found, it was replaced by the cpp + ICC="yes" + AC_MSG_RESULT([yes]) + [$1] + ) + fi + if test "$ICC" = "no"; then + # this is not ICC + AC_MSG_RESULT([no]) + fi +]) + dnl We create a function for detecting which compiler we use and then set as dnl pendantic compiler options as possible for that particular compiler. The dnl options are only used for debug-builds. AC_DEFUN([CURL_CC_DEBUG_OPTS], [ + if test "z$ICC" = "z"; then + CURL_DETECT_ICC + fi + if test "$GCC" = "yes"; then dnl figure out gcc version! @@ -1121,17 +1153,6 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS], gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` AC_MSG_RESULT($gccver) - AC_MSG_CHECKING([if this is icc in disguise]) - AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER], - dnl action if the text is found, this it has not been replaced by the - dnl cpp - ICC="no" - AC_MSG_RESULT([no]), - dnl the text was not found, it was replaced by the cpp - ICC="yes" - AC_MSG_RESULT([yes]) - ) - if test "$ICC" = "yes"; then dnl this is icc, not gcc. -- cgit v1.2.3