aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m445
-rw-r--r--configure.ac7
2 files changed, 40 insertions, 12 deletions
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, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, 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.
diff --git a/configure.ac b/configure.ac
index 7f4d4fcdf..bb99c696e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,6 +307,13 @@ dnl The actual use of the USE_MANUAL variable is done much later in this
dnl script to allow other actions to disable it as well.
dnl **********************************************************************
+dnl check if this is the Intel ICC compiler, and if so make it stricter
+dnl (convert warning 147 into an error) so that it properly can detect the
+dnl gethostbyname_r() version
+dnl **********************************************************************
+CURL_DETECT_ICC([CFLAGS="$CFLAGS -we 147"])
+
+dnl **********************************************************************
dnl Checks for libraries.
dnl **********************************************************************