Skip to content

Commit 14caa62

Browse files
committed
Add libraries to fix compile of ctypes on MINGW
1 parent 792304e commit 14caa62

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

configure.ac

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4244,6 +4244,12 @@ AS_CASE([$MACHDEP],
42444244
[SELECTMODULE_LIBS=""]
42454245
)
42464246

4247+
dnl On MINGW, you need to link againt ole32, oleaut32 and uuid for ctypes
4248+
AS_CASE([$MACHDEP],
4249+
[win32], [CTYPES_LIBS="-lole32 -loleaut32 -luuid"],
4250+
[CTYPES_LIBS=""]
4251+
)
4252+
42474253
dnl detect sqlite3 from Emscripten emport
42484254
PY_CHECK_EMSCRIPTEN_PORT([LIBSQLITE3], [-sUSE_SQLITE3])
42494255

@@ -7927,7 +7933,7 @@ PY_STDLIB_MOD([_crypt],
79277933
[$LIBCRYPT_CFLAGS], [$LIBCRYPT_LIBS])
79287934
PY_STDLIB_MOD([_ctypes],
79297935
[], [test "$have_libffi" = yes],
7930-
[$NO_STRICT_OVERFLOW_CFLAGS $LIBFFI_CFLAGS], [$LIBFFI_LIBS])
7936+
[$NO_STRICT_OVERFLOW_CFLAGS $LIBFFI_CFLAGS], [$LIBFFI_LIBS $CTYPES_LIBS])
79317937
PY_STDLIB_MOD([_curses],
79327938
[], [test "$have_curses" != "no"],
79337939
[$CURSES_CFLAGS], [$CURSES_LIBS]
@@ -7997,7 +8003,7 @@ PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes])
79978003
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
79988004
PY_STDLIB_MOD([_ctypes_test],
79998005
[test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$have_dynamic_loading" = yes],
8000-
[], [$LIBM])
8006+
[], [$LIBM $CTYPES_LIBS])
80018007

80028008
dnl Limited API template modules.
80038009
dnl The limited C API is not compatible with the Py_TRACE_REFS macro.

0 commit comments

Comments
 (0)