From a22d379c03684e8972de53288b75f73fd63dd3f0 Mon Sep 17 00:00:00 2001
From: mcuee <xiaofanc@gmail.com>
Date: Thu, 12 Jan 2023 21:06:36 +0800
Subject: [PATCH] Update configure.ac for MinGW build

Fix avrdudes#957.
Even though we are only supporting CMake build now, the fix is simple enough and not affecting CMake.
---
 src/configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/configure.ac b/src/configure.ac
index b57af4a6..5be8e2b9 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -78,6 +78,9 @@ dnl Makefile.am:77: compiling `config_gram.c' with per-target flags requires `AM
 AM_PROG_CC_C_O
 
 # Checks for libraries.
+# For MinGW.
+AC_CHECK_LIB([ws2_32], [WSAStartup])
+
 AC_CHECK_LIB([termcap], [tputs])
 AC_CHECK_LIB([ncurses], [tputs])
 AC_CHECK_LIB([readline], [readline])