https://github.com/python/cpython/commit/6f64920479e37d30c8a5c59f07c7b47712a8ccc7
commit: 6f64920479e37d30c8a5c59f07c7b47712a8ccc7
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-09-22T22:17:16+02:00
summary:
gh-157695: Fix acospi() detection in configure.ac (#157948)
Include <math.h> to check for acospi() and similar functions.
files:
M configure
M configure.ac
diff --git a/configure b/configure
index 84f2030049ac31..e5d3f0091058ac 100755
--- a/configure
+++ b/configure
@@ -27593,7 +27593,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
@@ -27635,7 +27635,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
@@ -27677,7 +27677,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
@@ -27719,7 +27719,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
@@ -27761,7 +27761,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
@@ -27803,7 +27803,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
@@ -27845,7 +27845,7 @@ then :
else case e in #(
e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+#include <math.h>
int
main (void)
{
diff --git a/configure.ac b/configure.ac
index bc94908213d2c7..82a623fedb8192 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6555,13 +6555,13 @@ AC_CHECK_FUNCS(
[AC_MSG_ERROR([Python requires C99 compatible libm])]
)
-PY_CHECK_FUNC_PRIVATE([acospi])
-PY_CHECK_FUNC_PRIVATE([asinpi])
-PY_CHECK_FUNC_PRIVATE([atanpi])
-PY_CHECK_FUNC_PRIVATE([atan2pi])
-PY_CHECK_FUNC_PRIVATE([cospi])
-PY_CHECK_FUNC_PRIVATE([sinpi])
-PY_CHECK_FUNC_PRIVATE([tanpi])
+PY_CHECK_FUNC_PRIVATE([acospi], [@%:@include <math.h>])
+PY_CHECK_FUNC_PRIVATE([asinpi], [@%:@include <math.h>])
+PY_CHECK_FUNC_PRIVATE([atanpi], [@%:@include <math.h>])
+PY_CHECK_FUNC_PRIVATE([atan2pi], [@%:@include <math.h>])
+PY_CHECK_FUNC_PRIVATE([cospi], [@%:@include <math.h>])
+PY_CHECK_FUNC_PRIVATE([sinpi], [@%:@include <math.h>])
+PY_CHECK_FUNC_PRIVATE([tanpi], [@%:@include <math.h>])
LIBS=$LIBS_SAVE
dnl For multiprocessing module, check that sem_open
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]