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.
This commit is contained in:
Daniel Stenberg 2004-02-19 19:25:11 +00:00
parent d765a00adb
commit 455b1af214
1 changed files with 13 additions and 1 deletions

View 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=""