diff --git a/configure b/configure
index 28c735e035c705787b0be9f73444d17bee09e0d2..f183d30404a691030497cc3effe87e9cda46513d 100755
--- a/configure
+++ b/configure
@@ -4621,6 +4621,7 @@ fi
 check_code cc arm_neon.h "int16x8_t test = vdupq_n_s16(0)" && enable intrinsics_neon
 
 check_ldflags -Wl,--as-needed
+check_ldflags -Wl,-z,noexecstack
 
 if check_func dlopen; then
     ldl=