diff -up configure.orig configure --- configure.orig 2022-09-19 16:39:46.000000000 -0600 +++ configure 2023-01-15 19:47:16.551480424 -0700 @@ -17604,12 +17604,12 @@ if test -n "$OPENBLAS_CFLAGS"; then pkg_cv_OPENBLAS_CFLAGS="$OPENBLAS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$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 + { { printf "%s\n" "$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=$? printf "%s\n" "$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 @@ -17621,12 +17621,12 @@ if test -n "$OPENBLAS_LIBS"; then pkg_cv_OPENBLAS_LIBS="$OPENBLAS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$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 + { { printf "%s\n" "$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=$? printf "%s\n" "$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 @@ -17647,9 +17647,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 @@ -17673,17 +17673,17 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ namespace conftest { - extern "C" int openblas_get_config (); + extern "C" int flexiblas_get_version (); } int main (void) { -return conftest::openblas_get_config (); +return conftest::flexiblas_get_version (); ; return 0; } _ACEOF -for ac_lib in '' openblas cblas blas +for ac_lib in '' flexiblas cblas blas do if test -z "$ac_lib"; then ac_res="none required" @@ -17740,22 +17740,20 @@ else $as_nop /* end confdefs.h. */ #include - char *openblas_get_config(void); + void flexiblas_get_version(void); int version[3]; int main (void) { 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; @@ -17806,7 +17804,7 @@ return conftest::cblas_dgemm (); return 0; } _ACEOF -for ac_lib in '' openblas cblas blas +for ac_lib in '' flexiblas cblas blas do if test -z "$ac_lib"; then ac_res="none required" @@ -17873,7 +17871,7 @@ return conftest::dgeqrf (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -17940,7 +17938,7 @@ return conftest::dgeqrf_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18007,7 +18005,7 @@ return conftest::DGEQRF (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18074,7 +18072,7 @@ return conftest::DGEQRF_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18165,17 +18163,17 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ namespace conftest { - extern "C" int openblas_get_config (); + extern "C" int flexiblas_get_version (); } int main (void) { -return conftest::openblas_get_config (); +return conftest::flexiblas_get_version (); ; return 0; } _ACEOF -for ac_lib in '' openblas cblas blas +for ac_lib in '' flexiblas cblas blas do if test -z "$ac_lib"; then ac_res="none required" @@ -18232,22 +18230,20 @@ else $as_nop /* end confdefs.h. */ #include - char *openblas_get_config(void); + void flexiblas_get_version(void); int version[3]; int main (void) { 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; @@ -18298,7 +18294,7 @@ return conftest::cblas_dgemm (); return 0; } _ACEOF -for ac_lib in '' openblas cblas blas +for ac_lib in '' flexiblas cblas blas do if test -z "$ac_lib"; then ac_res="none required" @@ -18365,7 +18361,7 @@ return conftest::dgeqrf (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18432,7 +18428,7 @@ return conftest::dgeqrf_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18499,7 +18495,7 @@ return conftest::DGEQRF (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18566,7 +18562,7 @@ return conftest::DGEQRF_ (); return 0; } _ACEOF -for ac_lib in '' openblas lapack +for ac_lib in '' flexiblas lapack do if test -z "$ac_lib"; then ac_res="none required" @@ -18648,12 +18644,12 @@ if test -n "$OPENBLASPCDIR"; then pkg_cv_OPENBLASPCDIR="$OPENBLASPCDIR" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openblas\""; } >&5 - ($PKG_CONFIG --exists --print-errors "openblas") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flexiblas\""; } >&5 + ($PKG_CONFIG --exists --print-errors "flexiblas") 2>&5 ac_status=$? printf "%s\n" "$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 @@ -18876,7 +18872,7 @@ fi 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 diff -up src/sage/env.py.orig src/sage/env.py --- src/sage/env.py.orig 2023-01-15 17:21:15.296585738 -0700 +++ src/sage/env.py 2023-01-15 17:22:34.106086752 -0700 @@ -222,7 +222,7 @@ FOURTITWO_PPI = var("FOURTITWO_PPI") FOURTITWO_CIRCUITS = var("FOURTITWO_CIRCUITS") FOURTITWO_GROEBNER = var("FOURTITWO_GROEBNER") 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") @@ -478,7 +478,7 @@ def cython_aliases(required_modules=None for lib, required in itertools.chain(((lib, True) for lib in required_modules), ((lib, False) for lib in optional_modules)): 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"] = ""