Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
move blas handling to build/pkgs/
Browse files Browse the repository at this point in the history
also, make atlas as not installable if openblas
is going to be used, and the other way around
  • Loading branch information
dimpase committed Dec 28, 2019
1 parent c031c9e commit b49f79e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
8 changes: 8 additions & 0 deletions build/pkgs/atlas/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SAGE_SPKG_CONFIGURE([atlas], [dnl use old test/installation procedure with env. variables
sage_spkg_install_atlas=yes
], [
AC_REQUIRE([SAGE_SPKG_CONFIGURE_OPENBLAS])
AS_IF([test x"$with_blas" = xatlas], [
sage_require_openblas=no
sage_require_atlas=yes])
])
19 changes: 18 additions & 1 deletion build/pkgs/openblas/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ SAGE_SPKG_CONFIGURE([openblas], [
])
], [sage_spkg_install_openblas=yes])
], [
AS_IF([test "x$with_blas" = xopenblas], [sage_require_openblas=yes])
AS_IF([test "x$with_blas" = xopenblas], [
sage_require_openblas=yes
sage_require_atlas=no])
], [
AC_MSG_CHECKING([BLAS library])
AC_ARG_WITH([blas],
[AS_HELP_STRING([--with-blas=openblas],
[use OpenBLAS as BLAS library (default)])]
[AS_HELP_STRING([--with-blas=atlas],
[use ATLAS as BLAS library])],,
[with_blas=openblas] # default
)
AS_CASE(["$with_blas"],
[openblas], [],
[atlas], [sage_spkg_install_openblas=no],
[AC_MSG_ERROR([allowed values for --with-blas are 'atlas' and 'openblas'])])
AC_MSG_RESULT([$with_blas])
AC_SUBST([SAGE_BLAS], [$with_blas])
]
)
19 changes: 0 additions & 19 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -400,25 +400,6 @@ esac
AC_MSG_RESULT([$SAGE_PYTHON_VERSION])
AC_SUBST(SAGE_PYTHON_VERSION)

# BLAS library
AC_MSG_CHECKING([BLAS library])
AC_ARG_WITH([blas],
[AS_HELP_STRING([--with-blas=openblas],
[use OpenBLAS as BLAS library (default)])]
[AS_HELP_STRING([--with-blas=atlas],
[use ATLAS as BLAS library])],,
[with_blas=openblas] # default
)

case "$with_blas" in
openblas) true;;
atlas) sage_spkg_install_openblas=no;;
*) AC_MSG_ERROR([allowed values for --with-blas are 'atlas' and 'openblas']);;
esac

AC_MSG_RESULT([$with_blas])
AC_SUBST([SAGE_BLAS], [$with_blas])

# $(TOOLCHAIN) variable containing prerequisites for the build
SAGE_TOOLCHAIN=gcc
if test "$SAGE_INSTALL_CCACHE" = yes ; then
Expand Down

0 comments on commit b49f79e

Please sign in to comment.