Mercurial > octave
changeset 33227:557fbfea93ab stable
build: Avoid overriding save_* variables from outer scope (bug #65476).
* m4/acinclude.m4 (OCTAVE_CHECK_SUNDIALS_SUNCONTEXT_CREATE,
OCTAVE_CHECK_SUNDIALS_SUNCONTEXT_CREATE, OCTAVE_CHECK_SUNDIALS_SUNLINSOL_KLU):
Avoid using save_LIBS, save_CPPFLAGS, and save_LDFLAGS as variable names to
save and restore variable values after a test. The same names are used in
configure.ac, and these macros must not override those variables.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Mon, 18 Mar 2024 15:15:45 +0100 |
parents | 45b7805c2a67 |
children | d5c5484322d1 eff20d5a5ad5 |
files | m4/acinclude.m4 |
diffstat | 1 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/acinclude.m4 Tue Mar 19 15:11:45 2024 -0700 +++ b/m4/acinclude.m4 Mon Mar 18 15:15:45 2024 +0100 @@ -2296,17 +2296,17 @@ dnl Check for library that exports SUNContext_Create. dnl AC_DEFUN([OCTAVE_CHECK_SUNDIALS_SUNCONTEXT_CREATE], [ - save_LIBS=$LIBS + ac_octave_save_LIBS=$LIBS LIBS="$SUNDIALS_IDA_LIBS $SUNDIALS_NVECSERIAL_LIBS $LIBS" dnl Check for SUNContext_Create without linking to libsundials_core. dnl That should succeed for SUNDIALS version 6. AC_CHECK_FUNC([SUNContext_Create]) - LIBS="$save_LIBS" + LIBS="$ac_octave_save_LIBS" if test "x$ac_cv_func_SUNContext_Create" != xyes; then ## SUNDIALS version 7 exports SUNContext_Create from libsundials_core - save_CPPFLAGS="$CPPFLAGS" - save_LDFLAGS="$LDFLAGS" - save_LIBS="$LIBS" + ac_octave_save_CPPFLAGS="$CPPFLAGS" + ac_octave_save_LDFLAGS="$LDFLAGS" + ac_octave_save_LIBS="$LIBS" LIBS="$SUNDIALS_CORE_LIBS $LIBS" LDFLAGS="$SUNDIALS_CORE_LDFLAGS $LDFLAGS" CPPFLAGS="$SUNDIALS_CORE_CPPFLAGS $CPPFLAGS" @@ -2315,9 +2315,9 @@ OCTAVE_CHECK_LIB(sundials_core, [SUNDIALS core], [], [sundials_core.h sundials/sundials_core.h], [SUNContext_Create], [], []) - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS="$ac_octave_save_CPPFLAGS" + LDFLAGS="$ac_octave_save_LDFLAGS" + LIBS="$ac_octave_save_LIBS" fi if test "x$ac_cv_func_SUNContext_Create" = xyes \ || test "x$octave_cv_lib_sundials_core" = xyes; then @@ -2451,9 +2451,9 @@ ## Check for library that exports SUNContext_Create OCTAVE_CHECK_SUNDIALS_SUNCONTEXT_CREATE ## Check for current KLU function name first. - save_CPPFLAGS="$CPPFLAGS" - save_LDFLAGS="$LDFLAGS" - save_LIBS="$LIBS" + ac_octave_save_CPPFLAGS="$CPPFLAGS" + ac_octave_save_LDFLAGS="$LDFLAGS" + ac_octave_save_LIBS="$LIBS" CPPFLAGS="$SUNDIALS_CORE_CPPFLAGS $CPPFLAGS" LDFLAGS="$SUNDIALS_CORE_LDFLAGS $LDFLAGS" LIBS="$SUNDIALS_CORE_LIBS $LIBS" @@ -2541,9 +2541,9 @@ warn_sundials_sunlinsol_klu="SUNDIALS IDA library not configured with SUNLINSOL_KLU or sunlinsol_klu.h is not usable. The solvers ode15i and ode15s will not support the sparse Jacobian feature." OCTAVE_CONFIGURE_WARNING([warn_sundials_sunlinsol_klu]) fi - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" + CPPFLAGS="$ac_octave_save_CPPFLAGS" + LDFLAGS="$ac_octave_save_LDFLAGS" + LIBS="$ac_octave_save_LIBS" ]) dnl dnl Like AC_CONFIG_FILES, but don't touch the output file if it already