aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-25 14:14:30 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-25 14:14:30 +0000
commit6bd2de0c422da83bcccd1afe8bab8ab9d641df60 (patch)
treed258b8cefb3c9e22c6082b0070d607cfd5083e4c
parent82c31256e10c99d7a56591051a4acd01778b02bf (diff)
set debug options when using the icc compiler
-rw-r--r--acinclude.m418
1 files changed, 14 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 60a41f311..8a03d7f1d 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -505,7 +505,17 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
if test "$ICC" = "yes"; then
dnl this is icc, not gcc.
- WARN = ""
+
+ dnl Warning 279 warns on static conditions in while expressions,
+ dnl ignore that.
+
+ WARN="-wd279"
+
+ if test "$gccnum" -gt "600"; then
+ dnl icc 6.0 and older doesn't have the -Wall flag, although it does
+ dnl have -wd<n>
+ WARN="-Wall $WARN"
+ fi
else dnl $ICC = yes
dnl
WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wundef -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare"
@@ -529,20 +539,20 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS],
fi
fi
- NEWFLAGS=""
for flag in $CPPFLAGS; do
case "$flag" in
-I*)
dnl include path
add=`echo $flag | sed 's/^-I/-isystem /g'`
- NEWFLAGS="$NEWFLAGS $add"
+ WARN="$WARN $add"
;;
esac
done
- CFLAGS="$CFLAGS $WARN $NEWFLAGS"
fi dnl $ICC = no
+ CFLAGS="$CFLAGS $WARN"
+
fi dnl $GCC = yes
dnl strip off optimizer flags