--- libgphoto2-2.5.31.orig/configure.ac	2023-09-02 11:16:57.000000000 +0200
+++ libgphoto2-2.5.31/configure.ac	2023-09-04 11:45:17.844249400 +0200
@@ -342,14 +342,12 @@
             [AS_HELP_STRING([--without-ws232],
 	                    [Build without ws2_32 library (default: no)])])
 AS_IF([test "x$with_ws232" != "xno"], [dnl
-	AC_CHECK_LIB([ws2_32], [WSAStartup], [dnl
 		AC_CHECK_HEADER([winsock.h], [dnl
 			AC_DEFINE([HAVE_LIBWS232], [1],
 			          [define if we found LIBWS232 and its headers])
 			LIBWS232_LIBS="-lws2_32"
 			libws232_msg="yes"
 		])
-	])
 ])
 GP_CONFIG_MSG([Winsocket support (for PTP/IP)],[${libws232_msg}])
 
