Skip to content

Commit e9267ce

Browse files
naveen521kklazka
authored andcommitted
Fix building _socket module
1 parent 69d27f4 commit e9267ce

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

configure.ac

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4009,6 +4009,12 @@ AS_CASE([$ac_sys_system],
40094009
[OSSAUDIODEV_LIBS=""]
40104010
)
40114011

4012+
dnl On MINGW, you need to link against ws2_32 and iphlpapi for sockets to work
4013+
AS_CASE([$ac_sys_system],
4014+
[MINGW], [SOCKET_LIBS="-lws2_32 -liphlpapi"],
4015+
[SOCKET_LIBS=""]
4016+
)
4017+
40124018
dnl detect sqlite3 from Emscripten emport
40134019
PY_CHECK_EMSCRIPTEN_PORT([LIBSQLITE3], [-sUSE_SQLITE3])
40144020

@@ -7458,7 +7464,9 @@ PY_STDLIB_MOD([mmap],
74587464
PY_STDLIB_MOD([_socket],
74597465
[], m4_flatten([test "$ac_cv_header_sys_socket_h" = "yes"
74607466
-a "$ac_cv_header_sys_types_h" = "yes"
7461-
-a "$ac_cv_header_netinet_in_h" = "yes"]))
7467+
-a "$ac_cv_header_netinet_in_h" = "yes"
7468+
-o "$MACHDEP" = "win32"]),
7469+
[], [$SOCKET_LIBS])
74627470

74637471
dnl platform specific extensions
74647472
PY_STDLIB_MOD([grp], [], [test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes])

0 commit comments

Comments
 (0)