changeset 30544:783daed2431c

maint: merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 24 Dec 2021 11:09:04 +0100
parents 89c23b73b9d0 (current diff) 653493339a8a (diff)
children 85c0a085ded7
files
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m4/acinclude.m4	Fri Dec 24 08:56:33 2021 +0100
+++ b/m4/acinclude.m4	Fri Dec 24 11:09:04 2021 +0100
@@ -2357,7 +2357,7 @@
   ac_octave_save_LIBS=$LIBS
   LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $LIBS"
   dnl Current API functions present in SUNDIALS version 4
-  AC_CHECK_FUNCS([IDASetJacFn IDASetLinearSolver SUNLinSol_Dense SUNSparseMatrix_Reallocate])
+  AC_CHECK_FUNCS([IDASetJacFn IDASetLinearSolver SUNLinSol_Dense SUNSparseMatrix_Reallocate SUNContext_Create])
   dnl FIXME: The purpose of the following tests is to detect the deprecated
   dnl API from SUNDIALS version 3, which should only be used if the current
   dnl API tests above failed. For now, always test for ida_direct.h.
@@ -2378,6 +2378,14 @@
     octave_have_sundials_compatible_api=no
   fi
   AC_MSG_RESULT([$octave_have_sundials_compatible_api])
+  dnl Octave doesn't yet support the SUNContext API introduced in SUNDIALS 6.0.
+  dnl For now, check for that API and de-activate features if it is found.
+  dnl FIXME: Properly support that API.
+  AC_MSG_CHECKING([whether SUNDIALS API uses SUNContext object])
+  AC_MSG_RESULT([$ac_cv_func_SUNContext_Create])
+  if test "x$ac_cv_func_SUNContext_Create" = xyes; then
+    octave_have_sundials_compatible_api=no
+  fi
   if test $octave_have_sundials_compatible_api = no; then
     warn_sundials_disabled="SUNDIALS libraries do not provide an API that is compatible with Octave.  The solvers ode15i and ode15s will be disabled."
     OCTAVE_CONFIGURE_WARNING([warn_sundials_disabled])