# HG changeset patch # User John W. Eaton # Date 1552938493 0 # Node ID cfa2a65c9fdc33ced1a1440756e2f9d46b102ca1 # Parent 72fab319b47d19c4e5cf86531dd977b4f7187802 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. diff -r 72fab319b47d -r cfa2a65c9fdc m4/acinclude.m4 --- 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 may depend on including + ## 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 + #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],