gh-90005-ffi: Fix building _ctypes without pkg-config (GH-94451)

The fallback path did not set LIBFFI_LIBS variable to link with ``-lffi``.
This commit is contained in:
Christian Heimes 2022-07-01 09:23:41 +02:00 committed by GitHub
parent 62bb7a3b50
commit d6acdc1b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1 @@
Fix building ``_ctypes`` extension without ``pkg-config``.

10
configure generated vendored
View File

@ -12133,7 +12133,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5
$as_echo "$ac_cv_lib_ffi_ffi_call" >&6; }
if test "x$ac_cv_lib_ffi_ffi_call" = xyes; then :
have_libffi=yes
have_libffi=yes
LIBFFI_LIBS="-lffi"
else
have_libffi=no
fi
@ -12200,7 +12203,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5
$as_echo "$ac_cv_lib_ffi_ffi_call" >&6; }
if test "x$ac_cv_lib_ffi_ffi_call" = xyes; then :
have_libffi=yes
have_libffi=yes
LIBFFI_LIBS="-lffi"
else
have_libffi=no
fi

View File

@ -3605,7 +3605,10 @@ AS_VAR_IF([with_system_ffi], [yes], [
PKG_CHECK_MODULES([LIBFFI], [libffi], [have_libffi=yes], [
AC_CHECK_HEADER([ffi.h], [
WITH_SAVE_ENV([
AC_CHECK_LIB([ffi], [ffi_call], [have_libffi=yes], [have_libffi=no])
AC_CHECK_LIB([ffi], [ffi_call], [
have_libffi=yes
LIBFFI_LIBS="-lffi"
], [have_libffi=no])
])
])
])