Mercurial > hg > octave-nkf
changeset 3692:3e474e5b2986
[project @ 2000-07-05 15:26:04 by jwe]
author | jwe |
---|---|
date | Wed, 05 Jul 2000 15:26:05 +0000 |
parents | dd144c6dfc71 |
children | 87fa55a09f19 |
files | ChangeLog configure.in src/ChangeLog src/Makefile.in |
diffstat | 4 files changed, 45 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-07-05 Steven G. Johnson <stevenj@gil-galad.mit.edu> + + * Use BLAS_LIBS to save the names of BLAS libraries instead of + adding them to LIBS, then substitute BLAS_LIBS. + 2000-06-30 Steven G. Johnson <stevenj@gil-galad.mit.edu> * configure.in: Support for --with-fastblas (ATLAS).
--- a/configure.in +++ b/configure.in @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.330 $) +AC_REVISION($Revision: 1.331 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -537,67 +537,70 @@ fi fi -# remember current libs, so we can check if any libs were found below. -blas_save_LIBS="$LIBS" - AC_ARG_WITH(fastblas, [ --without-fastblas use included (generic) BLAS and LAPACK], with_fastblas=$withval, with_fastblas=yes) if test "$with_fastblas" = "no"; then - blas_save_LIBS="different from $LIBS so tests fail below" + BLAS_LIBS=" " elif test "$with_fastblas" != "yes"; then # user specified a BLAS library to try on the command line AC_CHECK_LIB($with_fastblas, $dgemm_func, - LIBS="-l$with_fastblas $LIBS", , $FLIBS) + BLAS_LIBS="-l$with_fastblas", , $FLIBS) fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # Checks for ATLAS BLAS library: - AC_CHECK_LIB(atlas, ATL_xerbla) - if test "$blas_save_LIBS" != "$LIBS"; then + AC_CHECK_LIB(atlas, ATL_xerbla, BLAS_LIBS="-latlas") + if test "x$BLAS_LIBS" != x; then # check for other atlas libs: - AC_CHECK_LIB(cblas, cblas_dgemm) + AC_CHECK_LIB(cblas, cblas_dgemm,BLAS_LIBS="-lcblas $BLAS_LIBS",,$BLAS_LIBS) AC_CHECK_LIB(f77blas, $dgemm_func, - LIBS="-lf77blas $LIBS", , $FLIBS) + BLAS_LIBS="-lf77blas $BLAS_LIBS", , $BLAS_LIBS $FLIBS) fi fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # BLAS in Alpha CXML library? - AC_CHECK_LIB(cxml, $dgemm_func, LIBS="-lcxml $LIBS", , $FLIBS) + AC_CHECK_LIB(cxml, $dgemm_func, BLAS_LIBS="-lcxml", , $FLIBS) fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # BLAS in Alpha DXML library? (now called CXML, see above) - AC_CHECK_LIB(dxml, $dgemm_func, LIBS="-ldxml $LIBS", , $FLIBS) + AC_CHECK_LIB(dxml, $dgemm_func, BLAS_LIBS="-ldxml", , $FLIBS) fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # Check for BLAS in Sun Performance library: - AC_CHECK_LIB(sunmath, acosp) - AC_CHECK_LIB(sunperf, $dgemm_func, LIBS="-xlic_lib=sunperf $LIBS") + AC_CHECK_LIB(sunmath, acosp, BLAS_LIBS="-lsunmath") + AC_CHECK_LIB(sunperf, $dgemm_func, BLAS_LIBS="-xlic_lib=sunperf $BLAS_LIBS", + , $BLAS_LIBS) fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # Check for BLAS in SCSL and SGIMATH libraries (prefer SCSL): AC_CHECK_LIB(scs, $dgemm_func, - LIBS="-lscs $LIBS", + BLAS_LIBS="-lscs", AC_CHECK_LIB(complib.sgimath, $dgemm_func, - LIBS="-lcomplib.sgimath $LIBS", , $FLIBS), $FLIBS) + BLAS_LIBS="-lcomplib.sgimath", , $FLIBS), $FLIBS) fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # Checks for BLAS in IBM ESSL library. We must also link # with -lblas in this case (ESSL does not include the full BLAS): AC_CHECK_LIB(blas, zherk, AC_CHECK_LIB(essl, $dgemm_func, - LIBS="-lessl -lblas $LIBS", , $FLIBS), , $FLIBS) + BLAS_LIBS="-lessl -lblas", , $FLIBS), , $FLIBS) fi -if test "$blas_save_LIBS" = "$LIBS"; then +if test "x$BLAS_LIBS" = x; then # Finally, check for the generic BLAS library: - AC_CHECK_LIB(blas, $dgemm_func, LIBS="-lblas $LIBS", , $FLIBS) + AC_CHECK_LIB(blas, $dgemm_func, BLAS_LIBS="-lblas", , $FLIBS) fi -if test "$blas_save_LIBS" != "$LIBS"; then +if test "$with_fastblas" = "no"; then + # Unset BLAS_LIBS so that we know below that nothing was found. + BLAS_LIBS="" +fi + +if test "x$BLAS_LIBS" != x; then BLAS_DIR="" # don't build our own BLAS # Check for LAPACK library. Note that ATLAS has its own liblapack.a, @@ -609,10 +612,12 @@ # doing AC_CHECK_FUNC if -llapack isn't found: AC_CHECK_LIB(lapack, $cheev_func, - [LIBS="-llapack $LIBS"; LAPACK_DIR=""], - AC_CHECK_FUNC($cheev_func, LAPACK_DIR=""), $FLIBS) + [BLAS_LIBS="-llapack $BLAS_LIBS"; LAPACK_DIR=""], + AC_CHECK_FUNC($cheev_func, LAPACK_DIR=""), $BLAS_LIBS $FLIBS) fi +AC_SUBST(BLAS_LIBS) + ### Handle dynamic linking and shared library options. ### Allow the user to experiment with dynamic linking using dlopen/dlsym.
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-07-05 Steven G. Johnson <stevenj@gil-galad.mit.edu> + + * Makefile.in (BLAS_LIBS): Substitute here. + (octave): Use $(BLAS_LIBS) in the final link command. + 2000-06-30 Steven G. Johnson <stevenj@gil-galad.mit.edu> * Makefile.in (octave): Link $(FLIBS) last.
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -190,6 +190,7 @@ OCTAVE_LIBS = $(LIBOCTINTERP) $(LIBOCTAVE) $(SPECIAL_MATH_LIB) $(LIBCRUFT) \ $(LIBPLPLOT) $(LIBREADLINE) $(LIBKPATHSEA) $(LIBGLOB) $(LIBDLFCN) +BLAS_LIBS = @BLAS_LIBS@ LIBS = @LIBS@ DISTFILES = Makefile.in ChangeLog mkdefs mkops mkgendoc \ @@ -256,7 +257,7 @@ octave.o builtins.o ops.o $(DLD_STATIC_OBJ) \ $(OCTAVE_LFLAGS) \ $(OCTAVE_LIBS) \ - $(LEXLIB) $(TERMLIBS) $(LIBS) $(FLIBS) + $(LEXLIB) $(TERMLIBS) $(BLAS_LIBS) $(LIBS) $(FLIBS) stmp-pic: pic @if [ -f stmp-pic ]; then \