summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2017-07-06 22:19:15 -0700
committerMatt Turner <[email protected]>2017-08-29 15:20:57 -0700
commitc5d2e2d43f697d4d9d35542f3839fcacaf848885 (patch)
treeb3b1e844ca1dd862b7281a6089987af7e544e677 /configure.ac
parente4b2b69e828c2ae26730d4643344a0712edeea95 (diff)
configure: Test for -Wno-initializer-overrides
Clang has "-Wno-initializer-overrides", while gcc has "-Wno-override-init". Quiets a lot of warnings with clang. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 50876b08466..ac64a38d437 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,6 +339,10 @@ 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
+AC_SUBST([WNO_OVERRIDE_INIT])
+
dnl
dnl Optional flags, check for compiler support
dnl