New --enable-fatal-warnings ./configure option that just adds -Werror
to CFLAGS

Signed-off-by: Derek Foreman <[email protected]>
---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index 97cbfe5..d7fa1b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -632,6 +632,15 @@ AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
 
 AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
 
+AC_ARG_ENABLE([fatal-warnings],
+              AC_HELP_STRING([--enable-fatal-warnings],
+                             [Build with -Werror]),
+              [enable_fatal_warnings=$enableval],
+              [enable_fatal_warnings=no])
+AS_IF([test x"$enable_fatal_warnings" != "xno"], [
+        CFLAGS="$CFLAGS -Werror"
+])
+
 AC_OUTPUT
 
 AC_MSG_RESULT([
-- 
2.6.4

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to