---
 configure.ac |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index be2fbbf..763464b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,6 +52,11 @@ AC_ARG_ENABLE(radeon-experimental-api,
              [Enable support for radeon's KMS API (default: disabled)]),
              [RADEON=$enableval], [RADEON=no])
 
+AC_ARG_ENABLE(strict-compilation,
+                         AS_HELP_STRING([--enable-strict-compilation],
+                         [Enable all warnings from compiler and make them 
errors (default: disabled)]),
+                         [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
+
 dnl ===========================================================================
 dnl check compiler flags
 AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
@@ -93,7 +98,7 @@ MAYBE_WARN="-Wall -Wextra \
 -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
 -Wdeclaration-after-statement -Wold-style-definition \
 -Wno-missing-field-initializers -Wno-unused-parameter \
--Wno-attributes -Wno-long-long -Winline"
+-Wno-attributes -Wno-long-long -Winline -pedantic"
 
 # invalidate cached value if MAYBE_WARN has changed
 if test "x$libdrm_cv_warn_maybe" != "x$MAYBE_WARN"; then
@@ -124,6 +129,10 @@ AC_CACHE_CHECK([for supported warning flags], 
libdrm_cv_warn_cflags, [
        AC_MSG_CHECKING([which warning flags were supported])])
 WARN_CFLAGS="$libdrm_cv_warn_cflags"
 
+if test "x$STRICT_COMPILE" = xyes; then
+       CFLAGS="$CFLAGS $WARN_CLAGS -Werror"
+fi
+
 if test "x$UDEV" = xyes; then
        AC_DEFINE(UDEV, 1, [Have UDEV support])
 fi
-- 
1.6.3.1


------------------------------------------------------------------------------
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to