Honor explicit specification of BLAS/LAPACK libraries
Only probe for libraries on system if no library is specified. If there is an error with the library that is specified as an argument, then raise an error instead of continuing to look for other libraries with a simple warning buried deep in the configuration log.
This commit is contained in:
parent
279fbb8267
commit
c8a52177bf
@ -98,6 +98,11 @@ if test "x$BLAS_LIBS" != x; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# don't probe if explicitly defined; by bailing out here if the
|
||||
# argument is set, we guard against typo, incompatible libs. etc.
|
||||
# being inadvertedly overrided by another (random) implementation
|
||||
if test "x$with_blas" == x; then
|
||||
|
||||
# BLAS linked to by default? (happens on some supercomputers)
|
||||
if test $ax_blas_ok = no; then
|
||||
save_LIBS="$LIBS"; LIBS="$LIBS"
|
||||
@ -186,6 +191,9 @@ if test $ax_blas_ok = no; then
|
||||
AC_CHECK_LIB(blas, $sgemm, [ax_blas_ok=yes; BLAS_LIBS="-lblas"])
|
||||
fi
|
||||
|
||||
# end of guard against automatic overriding explicit definitions
|
||||
fi
|
||||
|
||||
AC_SUBST(BLAS_LIBS)
|
||||
|
||||
LIBS="$ax_blas_save_LIBS"
|
||||
|
@ -101,6 +101,11 @@ if test "x$LAPACK_LIBS" != x; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# don't probe if explicitly defined; by bailing out here if the
|
||||
# argument is set, we guard against typo, incompatible libs. etc.
|
||||
# being inadvertedly overrided by another (random) implementation
|
||||
if test "x$with_lapack" == x; then
|
||||
|
||||
# LAPACK linked to by default? (is sometimes included in BLAS lib)
|
||||
if test $ax_lapack_ok = no; then
|
||||
save_LIBS="$LIBS"; LIBS="$LIBS $BLAS_LIBS $FLIBS"
|
||||
@ -118,6 +123,9 @@ for lapack in lapack lapack_rs6k; do
|
||||
fi
|
||||
done
|
||||
|
||||
# end of guard against automatic overriding explicit definitions
|
||||
fi
|
||||
|
||||
AC_SUBST(LAPACK_LIBS)
|
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
||||
|
Loading…
Reference in New Issue
Block a user