Skip to content

Commit 1698c88

Browse files
committed
build: check FLINT version during configure
Disallow FLINT versions earlier than 3.2.0 by performing a preprocessor-based check during configure.
1 parent 237cda5 commit 1698c88

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,17 @@ AC_ARG_WITH([flint],
401401
AS_IF([test "x$with_flint" != xno],
402402
[flag=:
403403
AS_IF([$flag], [AC_CHECK_HEADER([flint/flint.h], [], [flag=false])])
404+
AS_IF([$flag],
405+
[AC_MSG_CHECKING([for a suitable FLINT version])
406+
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <flint/flint.h>
407+
#if __FLINT_RELEASE < 30200
408+
#error "FLINT version must be >= 3.2.0: https://github.com/form-dev/form/issues/679"
409+
#endif]])],
410+
[AC_MSG_RESULT([yes])],
411+
[AC_MSG_RESULT([no])
412+
AC_MSG_NOTICE([FLINT version 3.2.0 or higher is required])
413+
flag=false]
414+
)])
404415
AS_IF([$flag],
405416
[# Check how to link against the math library.
406417
AC_SEARCH_LIBS([pow], [m])

0 commit comments

Comments
 (0)