Mercurial > octave
changeset 27013:b37c1656aa42
configure: test all SUNKLU functions after core SUNDIALS features (bug #55937)
* configure.ac: Restore SUNDIALS feature test order, reverts cset 5bd4ffb55b1b.
* acinclude.m4 (OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API): Do not test for the
SUNLinSol_KLU or SUNKLU functions and do not depend on KLU libraries for basic
SUNDIALS functionality. (OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU): Test for the
SUNLinSol_KLU and SUNKLU functions.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 02 Apr 2019 14:49:58 -0700 |
parents | 762bfd9fad94 |
children | daab1b311a98 |
files | configure.ac m4/acinclude.m4 |
diffstat | 2 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac Tue Apr 02 15:02:19 2019 -0700 +++ b/configure.ac Tue Apr 02 14:49:58 2019 -0700 @@ -2216,12 +2216,6 @@ dnl skipped if a warning message has already been generated that SUNDIALS is dnl disabled. warn_sundials_disabled= - dnl If using Sundials 3.1, the test for sunlinsol_klu library must be done before - dnl checking for SUNKLU because we must link with the sunlinsol_klu library in - dnl order to find the SUNKLU function. - if test -z "$warn_sundials_disabled"; then - OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU - fi if test -z "$warn_sundials_disabled"; then OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API fi @@ -2231,6 +2225,11 @@ 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 + OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU + fi fi LIBS="$save_LIBS"
--- a/m4/acinclude.m4 Tue Apr 02 15:02:19 2019 -0700 +++ b/m4/acinclude.m4 Tue Apr 02 14:49:58 2019 -0700 @@ -2218,15 +2218,15 @@ dnl AC_DEFUN([OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API], [ ac_octave_save_LIBS=$LIBS - LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_SUNLINSOLKLU_LIBS $SUNDIALS_NVECSERIAL_LIBS $KLU_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 SUNLinSol_KLU]) + AC_CHECK_FUNCS([IDASetJacFn IDASetLinearSolver SUNLinSol_Dense]) 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. AC_CHECK_HEADERS([ida/ida_direct.h ida_direct.h]) dnl Each of these is a deprecated analog to the functions listed above. - AC_CHECK_FUNCS([IDADlsSetJacFn IDADlsSetLinearSolver SUNDenseLinearSolver SUNKLU]) + AC_CHECK_FUNCS([IDADlsSetJacFn IDADlsSetLinearSolver SUNDenseLinearSolver]) LIBS=$ac_octave_save_LIBS AC_MSG_CHECKING([whether SUNDIALS API provides the necessary functions]) if test "x$ac_cv_func_IDASetJacFn" = xyes \ @@ -2294,7 +2294,8 @@ OCTAVE_CHECK_LIB(sundials_sunlinsolklu, SUNLINSOL_KLU, [], [], [SUNKLU], [], [don't use SUNDIALS SUNLINSOL_KLU library, disable ode15i and ode15s sparse Jacobian], - [AC_CACHE_CHECK([whether compiling a program that calls SUNKLU works], + [AC_CHECK_FUNCS([SUNLinSol_KLU SUNKLU]) + AC_CACHE_CHECK([whether compiling a program that calls SUNKLU works], [octave_cv_sundials_sunlinsol_klu], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #if defined (HAVE_IDA_IDA_H)