summaryrefslogtreecommitdiff
authorLuca Barbato <lu_zero@gentoo.org>2013-09-12 18:17:15 (GMT)
committer Luca Barbato <lu_zero@gentoo.org>2013-09-19 19:53:21 (GMT)
commite5d45e028cf4193b562075897e55091779e49f15 (patch)
tree9e25e4c218582b6f69e5bb0a94e6375133e23e6b
parentd8798276b65543d921adadf63cc7f5ba2d1604af (diff)
downloadffmpeg-e5d45e028cf4193b562075897e55091779e49f15.zip
ffmpeg-e5d45e028cf4193b562075897e55091779e49f15.tar.gz
ffmpeg-e5d45e028cf4193b562075897e55091779e49f15.tar.bz2
build: Support cparser
Diffstat
-rwxr-xr-xconfigure22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure b/configure
index 1e195d5..a7d981a 100755
--- a/configure
+++ b/configure
@@ -2372,6 +2372,18 @@ ccc_flags(){
done
}
+cparser_flags(){
+ for flag; do
+ case $flag in
+ -Wno-switch) echo -Wno-switch-enum ;;
+ -Wno-format-zero-length) ;;
+ -Wdisabled-optimization) ;;
+ -Wno-pointer-sign) echo -Wno-other ;;
+ *) echo $flag ;;
+ esac
+ done
+}
+
msvc_common_flags(){
for flag; do
case $flag in
@@ -2661,6 +2673,13 @@ probe_cc(){
if [ $pfx = hostcc ]; then
append _cflags -Dsnprintf=_snprintf
fi
+ elif $_cc --version 2>/dev/null | grep -q ^cparser; then
+ _type=cparser
+ _ident=$($_cc --version | head -n1)
+ _depflags='-MMD'
+ _cflags_speed='-O4'
+ _cflags_size='-O2'
+ _flags_filter=cparser_flags
fi
eval ${pfx}_type=\$_type
@@ -3981,6 +4000,9 @@ elif enabled clang; then
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
check_cflags -Werror=return-type
+elif enabled cparser; then
+ add_cflags -Wno-missing-variable-declarations
+ add_cflags -Wno-empty-statement
elif enabled armcc; then
# 2523: use of inline assembler is deprecated
add_cflags -W${armcc_opt},--diag_suppress=2523