summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-02 10:02:12 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-02 10:04:07 +0100
commit0db04ca01dfa34659abc407648bdac507df297f5 (patch)
tree9ac2ab5ca8fa97bb8339e1d3e7691e061f614370 /configure
parentb4f95c96a577f65d300ed94b5307773c13c4eb79 (diff)
parent056fd4fe65e70b4dbca97bcf7faf8b7ce3df993f (diff)
Merge commit '056fd4fe65e70b4dbca97bcf7faf8b7ce3df993f'
* commit '056fd4fe65e70b4dbca97bcf7faf8b7ce3df993f': configure: Properly check for availability of -Wno-foo warning flags Conflicts: configure Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 11 insertions, 5 deletions
diff --git a/configure b/configure
index e29cd1237d..e868535730 100755
--- a/configure
+++ b/configure
@@ -4425,13 +4425,9 @@ enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
# add some useful compiler flags if supported
check_cflags -Wdeclaration-after-statement
check_cflags -Wall
-check_cflags -Wno-parentheses
-check_cflags -Wno-switch
-check_cflags -Wno-format-zero-length
check_cflags -Wdisabled-optimization
check_cflags -Wpointer-arith
check_cflags -Wredundant-decls
-check_cflags -Wno-pointer-sign
check_cflags -Wwrite-strings
check_cflags -Wtype-limits
check_cflags -Wundef
@@ -4440,6 +4436,17 @@ check_cflags -Wno-pointer-to-int-cast
check_cflags -Wstrict-prototypes
enabled extra_warnings && check_cflags -Winline
+check_disable_warning(){
+ warning_flag=-W${1#-Wno-}
+ test_cflags $warning_flag && add_cflags $1
+}
+
+check_disable_warning -Wno-parentheses
+check_disable_warning -Wno-switch
+check_disable_warning -Wno-format-zero-length
+check_disable_warning -Wno-pointer-sign
+enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
+
# add some linker flags
check_ldflags -Wl,--warn-common
check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
@@ -4538,7 +4545,6 @@ elif enabled gcc; then
check_cflags -Werror=missing-prototypes
check_cflags -Werror=return-type
check_cflags -Werror=vla
- enabled extra_warnings || check_cflags -Wno-maybe-uninitialized
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
elif enabled clang; then