diff --git a/debian/rules b/debian/rules
index 9e30a9ef675c0a9099c270fcb9f53adcf840319e..41b2ae0ba5113562bd8a2c849c26858ee6746351 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,12 @@ ifeq ($(shell dpkg --compare-versions `c++ -dumpversion || echo 0` ge 4.8 || ech
 export CXX = g++-4.8
 endif
 
+meson_options =
+
+ifeq ($(DEB_DISTRIBUTION),UNRELEASED)
+meson_options += --werror
+endif
+
 gtk_doc_has_cflags := $(shell \
 	if gtkdoc-scangobj --help 2>&1 | grep '[-]-cflags' >/dev/null; then \
 		echo true; \
@@ -42,7 +48,7 @@ override_dh_auto_configure:
 		-Dgtk_doc=$(gtk_doc_has_cflags) \
 		-Dintrospection=false \
 		-Dmultiarch_tuple=$(DEB_HOST_MULTIARCH) \
-		$(NULL)
+		$(meson_options)
 
 override_dh_auto_build:
 	ninja -C builddir