Skip to content

Commit d6acdc1

Browse files
authored
gh-90005-ffi: Fix building _ctypes without pkg-config (GH-94451)
The fallback path did not set LIBFFI_LIBS variable to link with ``-lffi``.
1 parent 62bb7a3 commit d6acdc1

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix building ``_ctypes`` extension without ``pkg-config``.

configure

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3605,7 +3605,10 @@ AS_VAR_IF([with_system_ffi], [yes], [
36053605
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
36063606
AC_CHECK_HEADER([ffi.h], [
36073607
WITH_SAVE_ENV([
3608-
AC_CHECK_LIB([ffi], [ffi_call], [have_libffi=yes], [have_libffi=no])
3608+
AC_CHECK_LIB([ffi], [ffi_call], [
3609+
have_libffi=yes
3610+
LIBFFI_LIBS="-lffi"
3611+
], [have_libffi=no])
36093612
])
36103613
])
36113614
])

0 commit comments

Comments
 (0)