summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-19 19:25:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-19 19:25:11 +0000
commit455b1af214a4c17fc101ca76f417d93dca91e77a (patch)
tree6e09f9acb6ffcf84c027c4b85938d176b37693fd /configure.ac
parentd765a00adbc9b0a748279f88a3b7f40f7f22426d (diff)
downloadcurl-455b1af214a4c17fc101ca76f417d93dca91e77a.tar.gz
When --enable-debug is used, for every -I provided to $CPPFLAGS we add
a corresponding -isystem, if using gcc, to inhibit warnings on those headers.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c1ffe3de7..dc1ec2061 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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=""