diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2004-12-15 21:09:53 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2004-12-15 21:09:53 +0000 |
commit | 38181fbc7469ea69c8679d45f5968bdac7aea935 (patch) | |
tree | 1bce32c20d1ec032c4038e8dcfb3d25729853a00 | |
parent | 8847e61fca21de7f3b2c8ffe1c5ad96d7aaffd3e (diff) |
Fix the --enable-debug compiler warning options for older versions of gcc.
-rw-r--r-- | acinclude.m4 | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 719f65d23..d911a8f3e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -690,10 +690,15 @@ AC_DEFUN([CURL_CC_DEBUG_OPTS], fi else dnl $ICC = yes dnl this is a set of options we believe *ALL* gcc versions support: - WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare" + WARN="-W -Wall -Wwrite-strings -pedantic -Wpointer-arith -Wnested-externs -Winline -Wmissing-prototypes" dnl -Wcast-align is a bit too annoying on all gcc versions ;-) + if test "$gccnum" -ge "207"; then + dnl gcc 2.7 or later (well, they don't work on 2.2.2) + WARN="$WARN -Wno-long-long -Wmissing-declarations -Wsign-compare" + fi + if test "$gccnum" -gt "295"; then dnl only if the compiler is newer than 2.95 since we got lots of dnl "`_POSIX_C_SOURCE' is not defined" in system headers with |