From 58e7dee5cccd09a1cb606536f451c5097da87e16 Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 7 Mar 2025 11:23:19 +0000 Subject: [PATCH] configure.ac: fix the msys2 build Apparently the import library is called ws_32 on the mingw64 platform, search for that in addition to the other winsock libraries. If no library is found, bail out the compilation rather than silently continuing, which causes lots of linker errors later. --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 12b1e694..f7af49a7 100644 --- a/configure.ac +++ b/configure.ac @@ -307,8 +307,9 @@ Cannot find a definition for ntohs and/or ntohl! =========================================]) fi AC_LANG([C]) -AC_SEARCH_LIBS([ntohs], [-lnet -lwinsock32]) - +AC_SEARCH_LIBS([ntohs], [ws2_32 net winsock32], [], [ + AC_MSG_ERROR([Cannot find a library providing ntohs]) +]) dnl dnl is va_list addressable?