]> granicus.if.org Git - curl/commitdiff
When --enable-debug is used, for every -I provided to $CPPFLAGS we add
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Feb 2004 19:25:11 +0000 (19:25 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 19 Feb 2004 19:25:11 +0000 (19:25 +0000)
a corresponding -isystem, if using gcc, to inhibit warnings on those
headers.

configure.ac

index c1ffe3de7e746bc2a520a6e2b443f1250d27dd02..dc1ec20612fc261baca4d1201d123da0f863ece7 100644 (file)
@@ -1214,7 +1214,19 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
        
        fi
 
-       CFLAGS="$CFLAGS $WARN"
+       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
     dnl strip off optimizer flags
     NEWFLAGS=""