Index: apps/build.tcl =================================================================== diff -u -r5a80e290968c4a48ef91cf714f522edb8a75c6d5 -r0aae129621a59088bba8470cd7aef9ce2221c4b7 --- apps/build.tcl (.../build.tcl) (revision 5a80e290968c4a48ef91cf714f522edb8a75c6d5) +++ apps/build.tcl (.../build.tcl) (revision 0aae129621a59088bba8470cd7aef9ce2221c4b7) @@ -81,11 +81,6 @@ switch -exact -- $TOOLCHAIN { autoconf-tea { set opts [list --libdir=$tclDir --enable-64bit] - - # see https://core.tcl-lang.org/tips/doc/trunk/tip/538.md - if {$TCLTAG eq "core-8-branch"} { - lappend opts "--without-system-libtommath" - } exec >@stdout 2>@stderr bash -lc "./configure $opts" exec >@stdout 2>@stderr bash -lc "make" Index: generic/nsf.c =================================================================== diff -u -r6ef097d5e5cc5515e5aa2960cf2132a5aa258391 -r0aae129621a59088bba8470cd7aef9ce2221c4b7 --- generic/nsf.c (.../nsf.c) (revision 6ef097d5e5cc5515e5aa2960cf2132a5aa258391) +++ generic/nsf.c (.../nsf.c) (revision 0aae129621a59088bba8470cd7aef9ce2221c4b7) @@ -16652,7 +16652,23 @@ *---------------------------------------------------------------------- */ +#if TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 +/* + * Starting with Tcl 8.7a4 and TIP 538, NSF might end up built against Tcl + * linking against a system-wide/ external libtommath, rather than with an + * embedded libtommath. In both cases, even the embedded one, Tcl does not + * ship tommat.h anymore. This leaves NSF without the necessary build-time + * definitions for mp_int and mp_clear (see below). For the time being, we + * rely on a hot fix by the TIP 538 author, providing compat definitions when + * setting the TCL_NO_TOMMATH_H macro before including tclTomMath.h. + * + * See https://core.tcl-lang.org/tcl/tktview?name=4663e0636f (also for other + * mid-term options) + */ +#define TCL_NO_TOMMATH_H 1 +#endif #include + int Nsf_ConvertToInteger(Tcl_Interp *interp, Tcl_Obj *objPtr, const Nsf_Param *pPtr, ClientData *clientData, Tcl_Obj **outObjPtr) nonnull(1) nonnull(2) nonnull(3) nonnull(4) nonnull(5);