diff -up configure.orig configure --- configure.orig 2021-05-09 16:01:38.000000000 -0600 +++ configure 2021-06-03 06:44:51.137915577 -0600 @@ -12184,12 +12184,12 @@ if test -n "$OPENBLAS_CFLAGS"; then pkg_cv_OPENBLAS_CFLAGS="$OPENBLAS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas >= 0.2.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "openblas >= 0.2.20") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas >= 3.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "flexiblas >= 3.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_OPENBLAS_CFLAGS=`$PKG_CONFIG --cflags "openblas >= 0.2.20" 2>/dev/null` + pkg_cv_OPENBLAS_CFLAGS=`$PKG_CONFIG --cflags "flexiblas >= 3.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12201,12 +12201,12 @@ if test -n "$OPENBLAS_LIBS"; then pkg_cv_OPENBLAS_LIBS="$OPENBLAS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas >= 0.2.20\""; } >&5 - ($PKG_CONFIG --exists --print-errors "openblas >= 0.2.20") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas >= 3.0.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "flexiblas >= 3.0.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_OPENBLAS_LIBS=`$PKG_CONFIG --libs "openblas >= 0.2.20" 2>/dev/null` + pkg_cv_OPENBLAS_LIBS=`$PKG_CONFIG --libs "flexiblas >= 3.0.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12227,9 +12227,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openblas >= 0.2.20" 2>&1` + OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flexiblas >= 3.0.0" 2>&1` else - OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openblas >= 0.2.20" 2>&1` + OPENBLAS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flexiblas >= 3.0.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENBLAS_PKG_ERRORS" >&5 @@ -12257,16 +12257,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ #ifdef __cplusplus extern "C" #endif -char openblas_get_config (); +char flexiblas_get_version (); int main () { -return openblas_get_config (); +return flexiblas_get_version (); ; return 0; } _ACEOF -for ac_lib in '' openblas cblas blas; do +for ac_lib in '' flexiblas cblas blas; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12319,22 +12319,22 @@ else /* end confdefs.h. */ #include - char *openblas_get_config(void); + void flexiblas_get_version(void); int version[3]; int main () { version[0] = version[1] = version[2] = 0; /*printf("%s", openblas_get_config());*/ - if (sscanf(openblas_get_config(), "OpenBLAS %d.%d.%d", - version, version+1, version+2) < 1) - return 1; + flexiblas_get_version(&version[0], &version[1], &version[2]); + + if ( 10000 * version[0] + 100 * version[1] + version[2] - < 10000 * 0 - + 100 * 2 - + 20) + < 10000 * 3 + + 100 * 0 + + 0) return 1; ; return 0; @@ -12387,7 +12387,7 @@ return cblas_dgemm (); return 0; } _ACEOF -for ac_lib in '' openblas cblas blas; do +for ac_lib in '' flexiblas cblas blas; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12451,7 +12451,7 @@ return dgeqrf (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12515,7 +12515,7 @@ return dgeqrf_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12579,7 +12579,7 @@ return DGEQRF (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12643,7 +12643,7 @@ return DGEQRF_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12731,16 +12731,16 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ #ifdef __cplusplus extern "C" #endif -char openblas_get_config (); +char flexiblas_get_version (); int main () { -return openblas_get_config (); +return flexiblas_get_version (); ; return 0; } _ACEOF -for ac_lib in '' openblas cblas blas; do +for ac_lib in '' flexiblas cblas blas; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12793,22 +12793,22 @@ else /* end confdefs.h. */ #include - char *openblas_get_config(void); + void flexiblas_get_version(void); int version[3]; int main () { version[0] = version[1] = version[2] = 0; /*printf("%s", openblas_get_config());*/ - if (sscanf(openblas_get_config(), "OpenBLAS %d.%d.%d", - version, version+1, version+2) < 1) - return 1; + flexiblas_get_version(&version[0], &version[1], &version[2]); + + if ( 10000 * version[0] + 100 * version[1] + version[2] - < 10000 * 0 - + 100 * 2 - + 20) + < 10000 * 3 + + 100 * 0 + + 0) return 1; ; return 0; @@ -12861,7 +12861,7 @@ return cblas_dgemm (); return 0; } _ACEOF -for ac_lib in '' openblas cblas blas; do +for ac_lib in '' flexiblas cblas blas; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12925,7 +12925,7 @@ return dgeqrf (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -12989,7 +12989,7 @@ return dgeqrf_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -13053,7 +13053,7 @@ return DGEQRF (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -13117,7 +13117,7 @@ return DGEQRF_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack; do +for ac_lib in '' flexiblas lapack; do if test -z "$ac_lib"; then ac_res="none required" else @@ -13192,12 +13192,12 @@ if test -n "$OPENBLASPCDIR"; then pkg_cv_OPENBLASPCDIR="$OPENBLASPCDIR" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas\""; } >&5 - ($PKG_CONFIG --exists --print-errors "openblas") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas\""; } >&5 + ($PKG_CONFIG --exists --print-errors "flexiblas") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_OPENBLASPCDIR=`$PKG_CONFIG --variable="pcfiledir" "openblas" 2>/dev/null` + pkg_cv_OPENBLASPCDIR=`$PKG_CONFIG --variable="pcfiledir" "flexiblas" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -13412,7 +13412,7 @@ fi if test x$sage_spkg_install_openblas != xyes; then : - SAGE_OPENBLAS_PC_COMMAND="\$(LN) -sf \"$OPENBLASPCDIR/openblas.pc\" \"\$(@)\"" + SAGE_OPENBLAS_PC_COMMAND="\$(LN) -sf \"$OPENBLASPCDIR/flexiblas.pc\" \"\$(@)\"" if test x$sage_install_blas_pc = xyes; then : diff -up src/sage/env.py.orig src/sage/env.py --- src/sage/env.py.orig 2021-06-16 13:13:15.378722205 -0600 +++ src/sage/env.py 2021-06-16 13:42:26.443996772 -0600 @@ -209,7 +209,7 @@ MAXIMA = var("MAXIMA", "maxima") MAXIMA_FAS = var("MAXIMA_FAS") SAGE_NAUTY_BINS_PREFIX = var("SAGE_NAUTY_BINS_PREFIX", "") ARB_LIBRARY = var("ARB_LIBRARY", "arb") -CBLAS_PC_MODULES = var("CBLAS_PC_MODULES", "cblas:openblas:blas") +CBLAS_PC_MODULES = var("CBLAS_PC_MODULES", "flexiblas:cblas:openblas:blas") ECL_CONFIG = var("ECL_CONFIG", "ecl-config") NTL_INCDIR = var("NTL_INCDIR") NTL_LIBDIR = var("NTL_LIBDIR") @@ -408,7 +408,7 @@ def cython_aliases(): for lib in ['fflas-ffpack', 'givaro', 'gsl', 'linbox', 'Singular', 'libpng', 'gdlib', 'm4ri', 'zlib', 'cblas', 'lapack']: var = lib.upper().replace("-", "") + "_" - if lib == 'cblas': + if lib == 'cblas' or lib == 'lapack': lib = get_cblas_pc_module_name() if lib == 'zlib': aliases[var + "CFLAGS"] = ""