diff --git a/build/make/configure.sh b/build/make/configure.sh
index 43f8e77924573aa6ed575d08181ab46453418f99..7991fb3c47da329fe0ddc587550a98e569e1eacd 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -327,7 +327,7 @@ EOF
 
 check_cflags() {
     log check_cflags "$@"
-    check_cc "$@" <<EOF
+    check_cc -Werror "$@" <<EOF
 int x;
 EOF
 }
@@ -341,7 +341,7 @@ check_cxxflags() {
 int x;
 EOF
       ;;
-      *) check_cxx "$@" <<EOF
+      *) check_cxx -Werror "$@" <<EOF
 int x;
 EOF
       ;;