summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-07 22:51:23 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-07 22:53:46 +0300
commitc56dfab597f36c679edb7185f7ce2f3bb7f5ece5 (patch)
treeb0001bae238e7728fe7e5a7b73529c1d83a15685 /configure
parent5a997b81959e789fa07a6594684db0a446eda4f7 (diff)
downloadmpv-c56dfab597f36c679edb7185f7ce2f3bb7f5ece5.tar.bz2
mpv-c56dfab597f36c679edb7185f7ce2f3bb7f5ece5.tar.xz
configure: clang: set custom warning flags for clang
Before there was no attempt to set warning flags sanely when compiling with clang. Set some reasonable defaults that cut down noise and enable various non-default warnings that are enabled with GCC too. I'm not sure whether clang is supposed to support more of the options now used with GCC - it accepts some of those options but they apparently have no effect; I didn't find any real documentation about the individual warnings.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure b/configure
index e2cc811987..17d267a708 100755
--- a/configure
+++ b/configure
@@ -2319,6 +2319,8 @@ elif test -z "$CFLAGS" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
elif test "$cc_vendor" = "clang"; then
CFLAGS="-O2 $_march $_pipe"
+ WARNFLAGS="-Wall -Wno-switch-enum -Wno-logical-op-parentheses -Wpointer-arith -Wundef -Wno-pointer-sign -Wmissing-prototypes"
+ ERRORFLAGS="-Werror=implicit-function-declaration"
elif test "$cc_vendor" != "gnu" ; then
CFLAGS="-O2 $_march $_mcpu $_pipe"
else