Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #29335: Fix Singular configure so it accepts NTL installed in no…
…nstandard locations As observed in #29104, Singular's configure may fail to find NTL even if Sage finds a system NTL. It continues to build, but the result is broken. The details: NTL's `spkg-configure.m4` (from #27265/#27822) uses `AC_CHECK_HEADER`/`AC_LINK_IFELSE`/`AC_RUN_IFELSE` and therefore is able to find NTL in an environment where the user has set CPPFLAGS and LDFLAGS accordingly. In that case, it sets `AC_SUBST(SAGE_NTL_PREFIX, [''])` Then `build/bin/sage-build-env-config.in` does: {{{ # This is usually blank if the system NTL is used, or $SAGE_LOCAL otherwise export SAGE_NTL_PREFIX="@SAGE_NTL_PREFIX@" if [ -n "$SAGE_NTL_PREFIX" ]; then # Many packages that depend on NTL accept a --with-ntl=<prefix> flag to # their ./configure scripts. When using the system's NTL this is not # generally necessary, but when using the NTL package installed in # SAGE_LOCAL it is useful to pass it. export SAGE_CONFIGURE_NTL="--with-ntl=$SAGE_NTL_PREFIX" fi }}} But Singular's `configure` (via its `m4/ntl-check.m4`) insists to find the headers in `NTL_HOME_PATH`, which defaults to `DEFAULT_CHECKING_PATH="/usr /usr/local /sw /opt/local"`, which can of course be quite wrong. On this ticket, we use a simple patch that modifies Singular's NTL detection code to make it similar to its GMP and FLINT detection codes. An alternative solution would be to always provide the --with-ntl=PREFIX option to Singular. We should also make it an error if Singular's configure cannot find NTL. See also: #25993 - Upgrade Singular URL: https://trac.sagemath.org/29335 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Dima Pasechnik
- Loading branch information