summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-10-25 08:25:27 (GMT)
committerGitHub <noreply@github.com>2021-10-25 08:25:27 (GMT)
commitfa26245a1c1aa938cce391348d6bd879da357522 (patch)
treeb193ebf766f3105a880ce8d8f7160b090b0c77b2 /configure
parent51ed2c56a1852cd6b09c85ba81312dc9782772ce (diff)
downloadcpython-fa26245a1c1aa938cce391348d6bd879da357522.zip
cpython-fa26245a1c1aa938cce391348d6bd879da357522.tar.gz
cpython-fa26245a1c1aa938cce391348d6bd879da357522.tar.bz2
bpo-45548: Remove _math.c workarounds for pre-C99 libm (GH-29179)
The :mod:`math` and :mod:`cmath` implementation now require a C99 compatible ``libm`` and no longer ship with workarounds for missing acosh, asinh, expm1, and log1p functions. The changeset also removes ``_math.c`` and moves the last remaining workaround into ``_math.h``. This simplifies static builds with ``Modules/Setup`` and resolves symbol conflicts. Co-authored-by: Mark Dickinson <mdickinson@enthought.com> Co-authored-by: Brett Cannon <brett@python.org> Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 4 insertions, 12 deletions
diff --git a/configure b/configure
index 198b070..b72660d 100755
--- a/configure
+++ b/configure
@@ -15092,7 +15092,7 @@ fi
LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"
-for ac_func in acosh asinh atanh erf erfc expm1 finite gamma
+for ac_func in acosh asinh atanh erf erfc expm1 finite gamma lgamma log1p log2 tgamma
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -15101,21 +15101,13 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-fi
-done
-
-for ac_func in lgamma log1p log2 tgamma
-do :
- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+else
+ as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5
fi
done
+LIBS=$LIBS_SAVE
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,