diff m4/acinclude.m4 @ 22899:31bd8a50d44c

Add Sundials library support * build-aux/subst-config-vals.in.sh: Add configuration variables for sundials_ida, sundials_nvecserial and klu libraries. * build-aux/subst-cross-config-vals.in.sh: Add configuration variables for sundials_ida, sundials_nvecserial and klu libraries. * configure.ac: Check for sundials_ida, sundials_nvecserial and klu headers and functions. Check whether sundials_ida has been configured with double precision. Set configuration variables and flags. * libinterp/build-env.h: Add variables to build_env namespace. * libinterp/build-env.in.cc: Add variables to build_env namespace. * m4/acinclude.m4: Add macro to test whether sundials_ida has been configured with double precision. * src/mkoctfile.in.cc: Get variables in order to generate oct-file.
author Francesco Faccio <francesco.faccio@mail.polimi.it>
date Tue, 23 Aug 2016 02:13:28 +0200
parents 953232868883
children 21707d6a02c7
line wrap: on
line diff
--- a/m4/acinclude.m4	Fri Dec 16 00:10:27 2016 -0500
+++ b/m4/acinclude.m4	Tue Aug 23 02:13:28 2016 +0200
@@ -1698,6 +1698,32 @@
   ])
 ])
 dnl
+dnl Check whether sundials_ida library is configured with double precision realtype
+dnl
+AC_DEFUN([OCTAVE_CHECK_SIZEOF_SUNDIALS_IDA_REALTYPE], [
+  AC_CACHE_CHECK([whether sundials_ida is configured with double precision realtype],
+    [octave_cv_sizeof_ida_double],
+    [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+        #if defined (HAVE_IDA_IDA_H)
+        #include <ida/ida.h>
+        #else
+        #include <ida.h>
+        #endif
+        #include <assert.h>
+        ]], [[
+        assert (sizeof (double) == sizeof (realtype));
+      ]])],
+      octave_cv_sizeof_ida_double=yes,
+      octave_cv_sizeof_ida_double=no)
+  ])
+  if test $octave_cv_sizeof_ida_double = yes; then
+    AC_DEFINE(HAVE_SUNDIALS_IDA_DOUBLE, 1,
+      [Define to 1 if sundials_ida is configured with realtype as double.])
+  else
+    warn_sundials_ida="sundials_ida library found, but it's not configured with double precision realtype; function ode15i and ode15s will be disabled"
+  fi
+])
+dnl
 dnl Add warning to final summary.
 dnl
 AC_DEFUN([OCTAVE_CONFIGURE_WARNING], [