]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Fix the --enable-debug compiler warning options for older versions of gcc.
authorDan Fandrich <dan@coneharvesters.com>
Wed, 15 Dec 2004 21:09:53 +0000 (21:09 +0000)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 15 Dec 2004 21:09:53 +0000 (21:09 +0000)
acinclude.m4

index 719f65d231a4f1f3e6478848e7eb5bd0f7f46300..d911a8f3ebbb8ad6adbe07577c4e70006c146a1a 100644 (file)
@@ -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