Skip to content

Commit a1404d9

Browse files
author
Matthias Koeppe
committed
build/pkgs/openblas/spkg-configure.m4: Allow 0.3.23 and newer
1 parent 5bd81de commit a1404d9

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

build/pkgs/openblas/spkg-configure.m4

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ SAGE_SPKG_CONFIGURE([openblas], [
1010
dnl Reject openblas 0.3.22 - https://github.com/sagemath/sage/pull/35371
1111
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MAJOR], [0])
1212
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MINOR], [3])
13-
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MICRO], [22])
13+
m4_pushdef([SAGE_OPENBLAS_LT_VERSION_MICRO], [99])
1414
m4_pushdef([SAGE_OPENBLAS_LT_VERSION], [SAGE_OPENBLAS_LT_VERSION_MAJOR.SAGE_OPENBLAS_LT_VERSION_MINOR.SAGE_OPENBLAS_LT_VERSION_MICRO])
1515
PKG_CHECK_MODULES([OPENBLAS], [openblas >= ]SAGE_OPENBLAS_MIN_VERSION [openblas < ]SAGE_OPENBLAS_LT_VERSION, [
1616
LIBS="$OPENBLAS_LIBS $LIBS"
@@ -40,6 +40,21 @@ SAGE_SPKG_CONFIGURE([openblas], [
4040
AC_MSG_WARN([Unable to locate the directory of openblas.pc. This should not happen!])
4141
sage_spkg_install_openblas=yes
4242
])
43+
AS_IF([test x$sage_spkg_install_openblas != xyes], [
44+
AC_MSG_CHECKING([the OpenBLAS version using openblas_get_config])
45+
AC_LANG_PUSH([C])
46+
AC_RUN_IFELSE([
47+
dnl Reject 0.3.22 - see https://github.com/sagemath/sage/pull/35377
48+
AC_LANG_PROGRAM([[#include <string.h>
49+
char *openblas_get_config(void); ]],
50+
[[if (!strncmp(openblas_get_config(), "OpenBLAS 0.3.22", 15)) return 1;]])
51+
], [
52+
AC_MSG_RESULT([good])
53+
], [
54+
AC_MSG_RESULT([known bad version])
55+
sage_spkg_install_openblas=yes])
56+
AC_LANG_POP([C])
57+
])
4358
AS_IF([test x$sage_spkg_install_openblas != xyes], [
4459
AC_SUBST([SAGE_SYSTEM_FACADE_PC_FILES])
4560
AC_SUBST([SAGE_OPENBLAS_PC_COMMAND], ["\$(LN) -sf \"$OPENBLASPCDIR/openblas.pc\" \"\$(@)\""])

0 commit comments

Comments
 (0)