Skip to content

Commit cbed501

Browse files
committed
+ WITH_SAVE_ENV
1 parent 06f937f commit cbed501

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

configure

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

configure.ac

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4098,8 +4098,11 @@ AS_VAR_IF([have_libffi], [yes], [
40984098
# See https://github.com/python/cpython/issues/125206 for more details.
40994099
#
41004100
AC_CACHE_CHECK([libffi has complex type support], [ac_cv_ffi_complex_double_supported],
4101-
[ac_save_libs=“$LIBS”
4102-
LIBS="-lffi"
4101+
[WITH_SAVE_ENV([
4102+
CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
4103+
LDFLAGS="$LIBFFI_LIBS $LDFLAGS"
4104+
LIBS="$LIBFFI_LIBS"
4105+
41034106
AC_RUN_IFELSE([AC_LANG_SOURCE([[
41044107
#include <complex.h>
41054108
#include <ffi.h>
@@ -4126,7 +4129,7 @@ int main(void)
41264129
]])], [ac_cv_ffi_complex_double_supported=yes],
41274130
[ac_cv_ffi_complex_double_supported=no],
41284131
[ac_cv_ffi_complex_double_supported=no])
4129-
LIBS="$ac_save_libs"])
4132+
])])
41304133
if test "$ac_cv_ffi_complex_double_supported" = "yes"; then
41314134
AC_DEFINE([Py_FFI_SUPPORT_C_COMPLEX], [1],
41324135
[Defined if _Complex C type can be used with libffi.])

0 commit comments

Comments
 (0)