changeset 28938:8592190176a8 stable

build: Re-instate configure test for SUNLinSol_Dense header (bug #59248). * configure.ac, m4/acinclude.m4 (OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE): Re-instate check for header `sunlinsol/sunlinsol_dense.h`. The presence of that header is sufficient to enable SUNLinSol_Dense support (in SUNDIALS 3 and later versions), afaict.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 15 Oct 2020 15:13:33 +0200
parents 4918e4ffa419
children 72874422e17d f6f60438f6cf
files configure.ac m4/acinclude.m4
diffstat 2 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Thu Oct 15 13:22:36 2020 +0200
+++ b/configure.ac	Thu Oct 15 15:13:33 2020 +0200
@@ -2262,6 +2262,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
@@ -2281,6 +2284,7 @@
 dnl works when some things are missing (for example, KLU)?
 if test -n "$SUNDIALS_IDA_LIBS" \
     && test -n "$SUNDIALS_NVECSERIAL_LIBS" \
+    && 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:22:36 2020 +0200
+++ b/m4/acinclude.m4	Thu Oct 15 15:13:33 2020 +0200
@@ -2563,6 +2563,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], [