configure.ac: append to existing initializer override flags
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 31 Oct 2017 19:26:33 +0000 (19:26 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 8 Nov 2017 15:53:00 +0000 (15:53 +0000)
Currently we were overwriting the existing warning flags, instead of
adding new [as applicable].

Fixes c5d2e2d43f6 ("configure: Test for -Wno-initializer-overrides")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
configure.ac

index b6f2d4595ef6a0055528248793a02f83f983d60d..c69c7d6b0c9deedc05877dbd247b51680bfad83e 100644 (file)
@@ -339,8 +339,8 @@ esac
 AC_SUBST([VISIBILITY_CFLAGS])
 AC_SUBST([VISIBILITY_CXXFLAGS])
 
-AX_CHECK_COMPILE_FLAG([-Wno-override-init],                    [WNO_OVERRIDE_INIT="-Wno-override-init"])         # gcc
-AX_CHECK_COMPILE_FLAG([-Wno-initializer-overrides],            [WNO_OVERRIDE_INIT="-Wno-initializer-overrides"]) # clang
+AX_CHECK_COMPILE_FLAG([-Wno-override-init],                    [WNO_OVERRIDE_INIT="$WNO_OVERRIDE_INIT -Wno-override-init"])         # gcc
+AX_CHECK_COMPILE_FLAG([-Wno-initializer-overrides],            [WNO_OVERRIDE_INIT="$WNO_OVERRIDE_INIT -Wno-initializer-overrides"]) # clang
 AC_SUBST([WNO_OVERRIDE_INIT])
 
 dnl