Mercurial > octave
changeset 26937:cfa2a65c9fdc
fix sunlinsol_klu.h detection with sundials 4.x (bug #55950)
* m4/acinclude.m4 (OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU): Check for
sunlinsol_klu.h outside of OCTAVE_CHECK_LIB macro.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 18 Mar 2019 19:48:13 +0000 |
parents | 72fab319b47d |
children | 58e300954518 |
files | m4/acinclude.m4 |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/acinclude.m4 Mon Mar 18 10:43:45 2019 -0700 +++ b/m4/acinclude.m4 Mon Mar 18 19:48:13 2019 +0000 @@ -2239,8 +2239,17 @@ dnl enabled. dnl AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU], [ + ## Including <sunlinsol/sunlinsol_klu.h> may depend on including + ## <suitesparse/klu.h> first. So perform the check as follows instead + ## of using OCTAVE_CHECK_LIB to check for sunlinsol_klu.h. + AC_CHECK_HEADERS([suitesparse/klu.h]) + AC_CHECK_HEADERS([sunlinsol/sunlinsol_klu.h], [], [], + [#ifdef HAVE_SUITESPARSE_KLU_H + # include <suitesparse/klu.h> + #endif + ]) OCTAVE_CHECK_LIB(sundials_sunlinsolklu, SUNLINSOL_KLU, [], - [sunlinsol/sunlinsol_klu.h], [SUNKLU], [], + [], [SUNKLU], [], [don't use SUNLINSOL_KLU library], [AC_CACHE_CHECK([whether compiling a program that calls SUNKLU works], [octave_cv_sundials_sunlinsol_klu],