aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-19 21:32:19 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-19 21:32:19 +0000
commita472cd93107eb5ecf07c31b2490846f054cdfcc5 (patch)
treeb927d4970ba9dc75d1aafc50ebbe113dc4a2cb61
parent8794cb286bccec61cc4b0badae64b6124c89ae32 (diff)
Anything that looks like gcc 5.0 or more is no longer treated as gcc. I hope
this will make us exclude icc 8.0 etc.
-rw-r--r--configure.ac53
1 files changed, 28 insertions, 25 deletions
diff --git a/configure.ac b/configure.ac
index dc1ec2061..7a2a6e5dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1199,33 +1199,36 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
AC_MSG_RESULT($gccver)
- dnl here's the standard setup
- WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-format-nonliteral -Wundef -Wpointer-arith -Wnested-externs -Wcast-align -Winline -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wsign-compare"
- if test "$gccnum" -ge "296"; then
- dnl gcc 2.96 or later
- WARN="$WARN -Wfloat-equal"
-
- dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
- dnl on i686-Linux as it gives us heaps with false positives
- if test "$gccnum" -ge "303"; then
- dnl gcc 3.3 and later
- WARN="$WARN -Wendif-labels"
+ if test "$gccnum" -lt "500"; then
+ dnl we only like gcc less than 5.0, since if it is above that it is
+ dnl likely just a compiler that looks like gcc (like icc 8.0)!
+ dnl here's the standard setup
+ WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wno-format-nonliteral -Wundef -Wpointer-arith -Wnested-externs -Wcast-align -Winline -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wsign-compare"
+ if test "$gccnum" -ge "296"; then
+ dnl gcc 2.96 or later
+ WARN="$WARN -Wfloat-equal"
+
+ dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
+ dnl on i686-Linux as it gives us heaps with false positives
+ if test "$gccnum" -ge "303"; then
+ dnl gcc 3.3 and later
+ WARN="$WARN -Wendif-labels"
+ fi
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"
- ;;
- esac
- done
-
- CFLAGS="$CFLAGS $WARN $NEWFLAGS"
+ NEWFLAGS=""
+ for flag in $CPPFLAGS; do
+ case "$flag" in
+ -I*)
+ dnl include path
+ add=`echo $flag | sed 's/^-I/-isystem /g'`
+ NEWFLAGS="$NEWFLAGS $add"
+ ;;
+ esac
+ done
+
+ CFLAGS="$CFLAGS $WARN $NEWFLAGS"
+ fi
fi
dnl strip off optimizer flags