diff --git a/configure b/configure
index 180578db7e183548ffbd39093ad1add1c2b74208..5cb2d1c0ae17e5ea5b262fad3dac9e1db9a1ce7b 100755
--- a/configure
+++ b/configure
@@ -3118,6 +3118,7 @@ elif enabled gcc; then
     check_cflags -fno-tree-vectorize
     check_cflags -Werror=implicit-function-declaration
     check_cflags -Werror=missing-prototypes
+    check_cflags -Werror=declaration-after-statement
 elif enabled llvm_gcc; then
     check_cflags -mllvm -stack-alignment=16
 elif enabled clang; then