From 91afff29af0e3f46b21056ce28776db0deedd184 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 27 Feb 2024 22:54:29 -0800 Subject: [PATCH] build/pkgs/flint: Reject FLINT >= 3.1.0 --- build/pkgs/flint/spkg-configure.m4 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/build/pkgs/flint/spkg-configure.m4 b/build/pkgs/flint/spkg-configure.m4 index 9576e4cc1e9..ddf60b596fd 100644 --- a/build/pkgs/flint/spkg-configure.m4 +++ b/build/pkgs/flint/spkg-configure.m4 @@ -1,11 +1,26 @@ SAGE_SPKG_CONFIGURE([flint], [ SAGE_SPKG_DEPCHECK([mpfr], [ - AC_CHECK_HEADER(flint/flint.h, [ + AC_CHECK_HEADER(flint/flint.h, [dnl dnl gr_get_fexpr appears in Flint 3.0 - AC_SEARCH_LIBS([gr_get_fexpr], [flint], [], [sage_spkg_install_flint=yes]) + AC_SEARCH_LIBS([gr_get_fexpr], [flint], [dnl + dnl Flint 3.1 is too new + AC_MSG_CHECKING([whether FLINT version is >= 3.1.0]) + AC_COMPILE_IFELSE([dnl + AC_LANG_PROGRAM([[#include + #if __FLINT_RELEASE >= 30100 + # error "FLINT 3.1 is too new" + #endif + ]]) + ], [dnl + AC_MSG_RESULT([no]) + ], [dnl + AC_MSG_RESULT([yes; too new]) + sage_spkg_install_flint=yes + ]) + ], [sage_spkg_install_flint=yes]) ], [sage_spkg_install_flint=yes]) ]) -], [], [], [ +], [], [], [dnl if test x$sage_spkg_install_flint = xyes; then AC_SUBST(SAGE_FLINT_PREFIX, ['$SAGE_LOCAL']) else