Mercurial > octave
comparison configure.ac @ 33132:2c8ade2c7491 stable
Fix compatibility with SUNDIALS 7 (bug #65392).
* configure.ac: Check for SUNDIALS core library. Check for name of type used
for real numbers by SUNDIALS. Show information about SUNDIALS core library in
summary.
* m4/acinclude.m4 (OCTAVE_CHECK_SUNDIALS_SUNREALTYPE): New function to check
for the name of the type used for real numbers by SUNDIALS.
(OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE): Use detected name in test.
* libinterp/dldfcn/__ode15__.cc: Replace "realtype" by "OCTAVE_SUNREALTYPE".
(IDA::initialize): Pass SUN_COMM_NULL as first argument of SUNContext_Create
if it is defined.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 02 Mar 2024 12:15:17 +0100 |
parents | 3eaaf9362cc3 |
children | a13cb0eb53a9 fe201b17eb86 |
comparison
equal
deleted
inserted
replaced
33130:ca773dcbb420 | 33132:2c8ade2c7491 |
---|---|
2346 CPPFLAGS="$save_CPPFLAGS" | 2346 CPPFLAGS="$save_CPPFLAGS" |
2347 LDFLAGS="$save_LDFLAGS" | 2347 LDFLAGS="$save_LDFLAGS" |
2348 LIBS="$save_LIBS" | 2348 LIBS="$save_LIBS" |
2349 fi | 2349 fi |
2350 | 2350 |
2351 ### Check for SUNDIALS core library and header. | |
2352 | |
2353 if test -n "$SUNDIALS_IDA_LIBS" && test -n "$SUNDIALS_NVECSERIAL_LIBS"; then | |
2354 | |
2355 save_CPPFLAGS="$CPPFLAGS" | |
2356 save_LDFLAGS="$LDFLAGS" | |
2357 save_LIBS="$LIBS" | |
2358 LIBS="$SUNDIALS_CORE_LIBS $LIBS" | |
2359 LDFLAGS="$SUNDIALS_CORE_LDFLAGS $LDFLAGS" | |
2360 CPPFLAGS="$SUNDIALS_CORE_CPPFLAGS $CPPFLAGS" | |
2361 OCTAVE_CHECK_LIB(sundials_core, [SUNDIALS core], | |
2362 [SUNDIALS core library not found.], | |
2363 [sundials_core.h sundials/sundials_core.h], [SUNContext_Create], | |
2364 [], []) | |
2365 CPPFLAGS="$save_CPPFLAGS" | |
2366 LDFLAGS="$save_LDFLAGS" | |
2367 LIBS="$save_LIBS" | |
2368 fi | |
2369 | |
2351 ### Check for SUNDIALS library features, some required, some optional. | 2370 ### Check for SUNDIALS library features, some required, some optional. |
2352 | 2371 |
2353 if test -n "$SUNDIALS_IDA_LIBS" && test -n "$SUNDIALS_NVECSERIAL_LIBS"; then | 2372 if test -n "$SUNDIALS_IDA_LIBS" && test -n "$SUNDIALS_NVECSERIAL_LIBS"; then |
2354 | 2373 |
2355 CPPFLAGS="$SUNDIALS_IDA_CPPFLAGS $SUNDIALS_NVECSERIAL_CPPFLAGS $KLU_CPPFLAGS $BLAS_CPPFLAGS $CPPFLAGS" | 2374 CPPFLAGS="$SUNDIALS_IDA_CPPFLAGS $SUNDIALS_NVECSERIAL_CPPFLAGS $SUNDIALS_CORE_CPPFLAGS $KLU_CPPFLAGS $BLAS_CPPFLAGS $CPPFLAGS" |
2356 LDFLAGS="$SUNDIALS_IDA_LDFLAGS $SUNDIALS_NVECSERIAL_LDFLAGS $KLU_LDFLAGS $BLAS_LDFLAGS $LDFLAGS" | 2375 LDFLAGS="$SUNDIALS_IDA_LDFLAGS $SUNDIALS_NVECSERIAL_LDFLAGS $SUNDIALS_CORE_LDFLAGS $KLU_LDFLAGS $BLAS_LDFLAGS $LDFLAGS" |
2357 LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $KLU_LIBS $BLAS_LIBS $FLIBS $LIBS" | 2376 LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $SUNDIALS_CORE_LIBS $KLU_LIBS $BLAS_LIBS $FLIBS $LIBS" |
2358 if test -z "$warn_sundials_nvecserial" && test -z "$warn_sundials_ida"; then | 2377 if test -z "$warn_sundials_nvecserial" && test -z "$warn_sundials_ida"; then |
2359 dnl Any of the following tests could determine that SUNDIALS is | 2378 dnl Any of the following tests could determine that SUNDIALS is |
2360 dnl incompatible and should be disabled. In that event, they all populate | 2379 dnl incompatible and should be disabled. In that event, they all populate |
2361 dnl the same variable with appropriate warning messages, and further tests | 2380 dnl the same variable with appropriate warning messages, and further tests |
2362 dnl should be skipped if a warning message has already been generated that | 2381 dnl should be skipped if a warning message has already been generated that |
2364 warn_sundials_disabled= | 2383 warn_sundials_disabled= |
2365 if test -z "$warn_sundials_disabled"; then | 2384 if test -z "$warn_sundials_disabled"; then |
2366 OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API | 2385 OCTAVE_CHECK_SUNDIALS_COMPATIBLE_API |
2367 fi | 2386 fi |
2368 if test -z "$warn_sundials_disabled"; then | 2387 if test -z "$warn_sundials_disabled"; then |
2388 OCTAVE_CHECK_SUNDIALS_SUNREALTYPE | |
2369 OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE | 2389 OCTAVE_CHECK_SUNDIALS_SIZEOF_REALTYPE |
2370 fi | 2390 fi |
2371 if test -z "$warn_sundials_disabled"; then | 2391 if test -z "$warn_sundials_disabled"; then |
2372 OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE | 2392 OCTAVE_CHECK_SUNDIALS_SUNLINSOL_DENSE |
2373 fi | 2393 fi |
2394 && test "x$octave_cv_sundials_realtype_is_double" = xyes \ | 2414 && test "x$octave_cv_sundials_realtype_is_double" = xyes \ |
2395 && test "x$octave_have_sundials_compatible_api" = xyes; then | 2415 && test "x$octave_have_sundials_compatible_api" = xyes; then |
2396 AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.]) | 2416 AC_DEFINE(HAVE_SUNDIALS, 1, [Define to 1 if SUNDIALS is available.]) |
2397 | 2417 |
2398 ## Options needed to build with SUNDIALS and its dependencies. | 2418 ## Options needed to build with SUNDIALS and its dependencies. |
2399 SUNDIALS_XCPPFLAGS="$SUNDIALS_IDA_CPPFLAGS $SUNDIALS_SUNLINSOLKLU_CPPFLAGS $SUNDIALS_NVECSERIAL_CPPFLAGS $KLU_CPPFLAGS" | 2419 SUNDIALS_XCPPFLAGS="$SUNDIALS_IDA_CPPFLAGS $SUNDIALS_SUNLINSOLKLU_CPPFLAGS $SUNDIALS_NVECSERIAL_CPPFLAGS $SUNDIALS_CORE_CPPFLAGS $KLU_CPPFLAGS" |
2400 SUNDIALS_XLDFLAGS="$SUNDIALS_IDA_LDFLAGS $SUNDIALS_SUNLINSOLKLU_LDFLAGS $SUNDIALS_NVECSERIAL_LDFLAGS $KLU_LDFLAGS" | 2420 SUNDIALS_XLDFLAGS="$SUNDIALS_IDA_LDFLAGS $SUNDIALS_SUNLINSOLKLU_LDFLAGS $SUNDIALS_NVECSERIAL_LDFLAGS $SUNDIALS_CORE_LDFLAGS $KLU_LDFLAGS" |
2401 SUNDIALS_XLIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_SUNLINSOLKLU_LIBS $SUNDIALS_NVECSERIAL_LIBS $KLU_LIBS" | 2421 SUNDIALS_XLIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_SUNLINSOLKLU_LIBS $SUNDIALS_NVECSERIAL_LIBS $SUNDIALS_CORE_LIBS $KLU_LIBS" |
2402 else | 2422 else |
2403 SUNDIALS_IDA_CPPFLAGS= | 2423 SUNDIALS_IDA_CPPFLAGS= |
2404 SUNDIALS_IDA_LDFLAGS= | 2424 SUNDIALS_IDA_LDFLAGS= |
2405 SUNDIALS_IDA_LIBS= | 2425 SUNDIALS_IDA_LIBS= |
2406 SUNDIALS_SUNLINSOLKLU_CPPFLAGS= | 2426 SUNDIALS_SUNLINSOLKLU_CPPFLAGS= |
2407 SUNDIALS_SUNLINSOLKLU_LDFLAGS= | 2427 SUNDIALS_SUNLINSOLKLU_LDFLAGS= |
2408 SUNDIALS_SUNLINSOLKLU_LIBS= | 2428 SUNDIALS_SUNLINSOLKLU_LIBS= |
2409 SUNDIALS_NVECSERIAL_CPPFLAGS= | 2429 SUNDIALS_NVECSERIAL_CPPFLAGS= |
2410 SUNDIALS_NVECSERIAL_LDFLAGS= | 2430 SUNDIALS_NVECSERIAL_LDFLAGS= |
2411 SUNDIALS_NVECSERIAL_LIBS= | 2431 SUNDIALS_NVECSERIAL_LIBS= |
2432 SUNDIALS_CORE_CPPFLAGS= | |
2433 SUNDIALS_CORE_LDFLAGS= | |
2434 SUNDIALS_CORE_LIBS= | |
2412 SUNDIALS_XCPPFLAGS= | 2435 SUNDIALS_XCPPFLAGS= |
2413 SUNDIALS_XLDFLAGS= | 2436 SUNDIALS_XLDFLAGS= |
2414 SUNDIALS_XLIBS= | 2437 SUNDIALS_XLIBS= |
2415 dnl Emit a fallback warning message in case SUNDIALS has been disabled for | 2438 dnl Emit a fallback warning message in case SUNDIALS has been disabled for |
2416 dnl some reason that hasn't already generated one of these known warnings. | 2439 dnl some reason that hasn't already generated one of these known warnings. |
3355 Sndfile libraries: $SNDFILE_LIBS | 3378 Sndfile libraries: $SNDFILE_LIBS |
3356 SPQR CPPFLAGS: $SPQR_CPPFLAGS | 3379 SPQR CPPFLAGS: $SPQR_CPPFLAGS |
3357 SPQR LDFLAGS: $SPQR_LDFLAGS | 3380 SPQR LDFLAGS: $SPQR_LDFLAGS |
3358 SPQR libraries: $SPQR_LIBS | 3381 SPQR libraries: $SPQR_LIBS |
3359 SuiteSparse config libraries: $SUITESPARSECONFIG_LIBS | 3382 SuiteSparse config libraries: $SUITESPARSECONFIG_LIBS |
3383 SUNDIALS core CPPFLAGS: $SUNDIALS_CORE_CPPFLAGS | |
3384 SUNDIALS core LDFLAGS: $SUNDIALS_CORE_LDFLAGS | |
3385 SUNDIALS core libraries: $SUNDIALS_CORE_LIBS | |
3360 SUNDIALS IDA CPPFLAGS: $SUNDIALS_IDA_CPPFLAGS | 3386 SUNDIALS IDA CPPFLAGS: $SUNDIALS_IDA_CPPFLAGS |
3361 SUNDIALS IDA LDFLAGS: $SUNDIALS_IDA_LDFLAGS | 3387 SUNDIALS IDA LDFLAGS: $SUNDIALS_IDA_LDFLAGS |
3362 SUNDIALS IDA libraries: $SUNDIALS_IDA_LIBS | 3388 SUNDIALS IDA libraries: $SUNDIALS_IDA_LIBS |
3363 SUNDIALS NVECTOR CPPFLAGS: $SUNDIALS_NVECSERIAL_CPPFLAGS | 3389 SUNDIALS NVECTOR CPPFLAGS: $SUNDIALS_NVECSERIAL_CPPFLAGS |
3364 SUNDIALS NVECTOR LDFLAGS: $SUNDIALS_NVECSERIAL_LDFLAGS | 3390 SUNDIALS NVECTOR LDFLAGS: $SUNDIALS_NVECSERIAL_LDFLAGS |