Skip to content

gh-125206: Correct detection of complex numbers support in libffi #126104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correct detection of complex numbers support in libffi.
19 changes: 16 additions & 3 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4098,8 +4098,10 @@ AS_VAR_IF([have_libffi], [yes], [
# See https://github.com/python/cpython/issues/125206 for more details.
#
AC_CACHE_CHECK([libffi has complex type support], [ac_cv_ffi_complex_double_supported],
[ac_save_cc="$CC"
CC="$CC -lffi"
[WITH_SAVE_ENV([
CPPFLAGS="$LIBFFI_CFLAGS $CPPFLAGS"
LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
LIBS="$LIBFFI_LIBS $LIBS"
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <complex.h>
#include <ffi.h>
Expand All @@ -4126,7 +4128,7 @@ int main(void)
]])], [ac_cv_ffi_complex_double_supported=yes],
[ac_cv_ffi_complex_double_supported=no],
[ac_cv_ffi_complex_double_supported=no])
CC="$ac_save_cc"])
])])
if test "$ac_cv_ffi_complex_double_supported" = "yes"; then
AC_DEFINE([Py_FFI_SUPPORT_C_COMPLEX], [1],
[Defined if _Complex C type can be used with libffi.])
Expand Down
Loading