diff --git a/configure.in b/configure.in
index 893a8b9619a23018d9fc6a8acd54d8d4954e9358..aefd09ad7980bb40bc293fa651a23107660be360 100644
--- a/configure.in
+++ b/configure.in
@@ -124,7 +124,14 @@ if test x$enable_libc = xyes; then
     fi
 
     dnl Checks for library functions.
-    AC_FUNC_ALLOCA
+    case "$host" in
+    *-*-cygwin* | *-*-mingw32*)
+        ;;
+    *)
+        AC_FUNC_ALLOCA
+        ;;
+    esac
+
     AC_FUNC_MEMCMP
     if test x$ac_cv_func_memcmp_working = xyes; then
         AC_DEFINE(HAVE_MEMCMP)