[vlc-devel] [PATCH 01/14] configure: restructure adding unknown args error flags

Marvin Scholz epirat07 at gmail.com
Wed Mar 11 13:37:22 CET 2020


---
 configure.ac | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index bc1874cb97..ca3f3e1a93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,8 +84,14 @@ AS_IF([test -n "${with_binary_version}"],[
 ])
 
 dnl Prevent clang from accepting unknown flags with a mere warning
-AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CFLAGS])
-AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option -Werror=invalid-command-line-argument], [CXXFLAGS])
+AX_CHECK_COMPILE_FLAG([-Werror=invalid-command-line-argument], [
+  AX_APPEND_FLAG([-Werror=invalid-command-line-argument], [CFLAGS])
+  AX_APPEND_FLAG([-Werror=invalid-command-line-argument], [CXXFLAGS])
+])
+AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option], [
+  AX_APPEND_FLAG([-Werror=unknown-warning-option], [CFLAGS])
+  AX_APPEND_FLAG([-Werror=unknown-warning-option], [CXXFLAGS])
+])
 
 dnl
 dnl  Check the operating system
-- 
2.21.1 (Apple Git-122.3)



More information about the vlc-devel mailing list