Skip to content

Commit

Permalink
Add libraries to fix compile of ctypes on MINGW
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen521kk committed Jan 1, 2024
1 parent 1f11a35 commit b06620c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4244,6 +4244,12 @@ AS_CASE([$MACHDEP],
[SELECTMODULE_LIBS=""]
)

dnl On MINGW, you need to link againt ole32, oleaut32 and uuid for ctypes
AS_CASE([$MACHDEP],
[win32], [CTYPES_LIBS="-lole32 -loleaut32 -luuid"],
[CTYPES_LIBS=""]
)

dnl detect sqlite3 from Emscripten emport
PY_CHECK_EMSCRIPTEN_PORT([LIBSQLITE3], [-sUSE_SQLITE3])

Expand Down Expand Up @@ -7927,7 +7933,7 @@ PY_STDLIB_MOD([_crypt],
[$LIBCRYPT_CFLAGS], [$LIBCRYPT_LIBS])
PY_STDLIB_MOD([_ctypes],
[], [test "$have_libffi" = yes],
[$NO_STRICT_OVERFLOW_CFLAGS $LIBFFI_CFLAGS], [$LIBFFI_LIBS])
[$NO_STRICT_OVERFLOW_CFLAGS $LIBFFI_CFLAGS], [$LIBFFI_LIBS $CTYPES_LIBS])
PY_STDLIB_MOD([_curses],
[], [test "$have_curses" != "no"],
[$CURSES_CFLAGS], [$CURSES_LIBS]
Expand Down Expand Up @@ -7997,7 +8003,7 @@ PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
PY_STDLIB_MOD([_ctypes_test],
[test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$have_dynamic_loading" = yes],
[], [$LIBM])
[], [$LIBM $CTYPES_LIBS])

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

0 comments on commit b06620c

Please sign in to comment.