This is an automated email from the git hooks/post-receive script. renard pushed a commit to branch master in repository getfem.
The following commit(s) were added to refs/heads/master by this push: new c6e023ed adaptation for brew install of superlu c6e023ed is described below commit c6e023edc4e0eb69035586f2343713f3644412ae Author: Yves Renard <yves.ren...@insa-lyon.fr> AuthorDate: Thu Dec 5 20:46:40 2024 +0100 adaptation for brew install of superlu --- configure.ac | 15 +++++++++++- src/gmm/gmm_arch_config.h.in | 3 +++ src/gmm/gmm_superlu_interface.h | 53 +++++++++++++++++++++++++++++------------ 3 files changed, 55 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index 0c8a084f..f44affd4 100644 --- a/configure.ac +++ b/configure.ac @@ -850,10 +850,23 @@ else found_superlu="no" fi; ]) + if test x$found_superlu = xno; then + AC_CHECK_HEADERS( + [slu_Cnames.h slu_cdefs.h slu_ddefs.h slu_sdefs.h lu_zdefs.h \ + slu_dcomplex.h slu_scomplex.h], + [found_superlu="yes";AC_DEFINE(GMM_USES_SUPERLU,,[defined if GMM is linked to the superlu library])], + [ if test "x$require_superlu" = "xyes"; then + AC_MSG_ERROR([Header files of SuperLU not found.]); + else + found_superlu="no" + fi; + ]) + fi; + if test x$found_superlu = xyes; then save_LIBS="$LIBS"; AC_CHECK_LIB([superlu], [dCreate_CompCol_Matrix], - [AC_DEFINE(GMM_USES_SUPERLU,,[defined if GMM is linked to the superlu library])], + [AC_DEFINE(GMM_NO_SUPERLU_SUBDIR,,[defined if GMM is linked to the superlu library])], [if test "x$require_superlu" = "xyes"; then AC_MSG_ERROR([SuperLU library not found]); else diff --git a/src/gmm/gmm_arch_config.h.in b/src/gmm/gmm_arch_config.h.in index 3e656c3a..4df50570 100644 --- a/src/gmm/gmm_arch_config.h.in +++ b/src/gmm/gmm_arch_config.h.in @@ -21,6 +21,9 @@ /* defined if GMM is linked to the superlu library */ #undef GMM_USES_SUPERLU +/* defined if superlu header files are not in a specific directory */ +#undef GMM_NO_SUPERLU_SUBDIR + /* Use blas with 64 bits integers */ #undef GMM_USE_BLAS64_INTERFACE diff --git a/src/gmm/gmm_superlu_interface.h b/src/gmm/gmm_superlu_interface.h index 5a7f69cb..fd5fe87d 100644 --- a/src/gmm/gmm_superlu_interface.h +++ b/src/gmm/gmm_superlu_interface.h @@ -55,22 +55,45 @@ typedef int int_t; # undef EMPTY #endif -#include "superlu/slu_Cnames.h" -#include "superlu/supermatrix.h" -#include "superlu/slu_util.h" +#if defined(GMM_NO_SUPERLU_SUBDIR) -namespace SuperLU_S { -#include "superlu/slu_sdefs.h" -} -namespace SuperLU_D { -#include "superlu/slu_ddefs.h" -} -namespace SuperLU_C { -#include "superlu/slu_cdefs.h" -} -namespace SuperLU_Z { -#include "superlu/slu_zdefs.h" -} + #include "slu_Cnames.h" + #include "supermatrix.h" + #include "slu_util.h" + + namespace SuperLU_S { + #include "slu_sdefs.h" + } + namespace SuperLU_D { + #include "slu_ddefs.h" + } + namespace SuperLU_C { + #include "slu_cdefs.h" + } + namespace SuperLU_Z { + #include "slu_zdefs.h" + } + +#else + + #include "superlu/slu_Cnames.h" + #include "superlu/supermatrix.h" + #include "superlu/slu_util.h" + + namespace SuperLU_S { + #include "superlu/slu_sdefs.h" + } + namespace SuperLU_D { + #include "superlu/slu_ddefs.h" + } + namespace SuperLU_C { + #include "superlu/slu_cdefs.h" + } + namespace SuperLU_Z { + #include "superlu/slu_zdefs.h" + } + +#endif #if (SUPERLU_MAJOR_VERSION > 6) # define SuperLuComplexFloat SuperLU_C::singlecomplex