changeset 28939:72874422e17d

maint: merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 15 Oct 2020 15:16:35 +0200
parents eddd971431a4 (current diff) 8592190176a8 (diff)
children 914816dd2f1a
files configure.ac m4/acinclude.m4
diffstat 2 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Oct 15 13:47:14 2020 +0200
+++ b/configure.ac	Thu Oct 15 15:16:35 2020 +0200
@@ -2279,6 +2279,9 @@
     if test -z "$warn_sundials_disabled"; then
       OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE
     fi
+    if test -z "$warn_sundials_disabled"; then
+      OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE
+    fi
     dnl The following tests determine whether certain optional features are
     dnl present in the SUNDIALS libraries, but will not disable using SUNDIALS.
     if test -z "$warn_sundials_disabled"; then
@@ -2298,7 +2301,8 @@
 dnl any tests fail, or can we fix __ode15__.cc so that it still partially
 dnl works when some things are missing (for example, KLU)?
 if test -n "$SUNDIALS_IDA_LIBS" && test -n "$SUNDIALS_NVECSERIAL_LIBS"; then
-  if test "x$octave_cv_sundials_realtype_is_double" = xyes \
+  if test "x$octave_cv_sundials_sunlinsol_dense" = xyes \
+      && test "x$octave_cv_sundials_realtype_is_double" = xyes \
       && test "x$octave_have_sundials_compatible_api" = xyes; then
     AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.])
 
--- a/m4/acinclude.m4	Thu Oct 15 13:47:14 2020 +0200
+++ b/m4/acinclude.m4	Thu Oct 15 15:16:35 2020 +0200
@@ -2049,6 +2049,22 @@
   fi
 ])
 dnl
+dnl Check whether SUNDIALS IDA library has the SUNLINSOL_DENSE linear solver.
+dnl
+AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE], [
+  AC_CHECK_HEADERS([sunlinsol/sunlinsol_dense.h],
+      octave_cv_sundials_sunlinsol_dense=yes,
+      octave_cv_sundials_sunlinsol_dense=no)
+    ])
+  if test $octave_cv_sundials_sunlinsol_dense = yes; then
+    AC_DEFINE(HAVE_SUNDIALS_SUNLINSOL_DENSE, 1,
+      [Define to 1 if SUNDIALS IDA includes the SUNLINSOL_DENSE linear solver.])
+  else
+    warn_sundials_disabled="SUNDIALS IDA library does not include the SUNLINSOL_DENSE linear solver.  The solvers ode15i and ode15s will be disabled."
+    OCTAVE_CONFIGURE_WARNING([warn_sundials_disabled])
+  fi
+])
+dnl
 dnl Add warning to final summary.
 dnl
 AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [