Mercurial > octave-nkf
diff configure.in @ 3690:55e59236c5e5
[project @ 2000-06-30 20:55:36 by jwe]
author | jwe |
---|---|
date | Fri, 30 Jun 2000 20:57:14 +0000 |
parents | 8aea513ff224 |
children | 3e474e5b2986 |
line wrap: on
line diff
--- a/configure.in Fri Jun 30 09:30:46 2000 +0000 +++ b/configure.in Fri Jun 30 20:57:14 2000 +0000 @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.329 $) +AC_REVISION($Revision: 1.330 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -509,6 +509,110 @@ AC_SUBST(F2CFLAGS) AC_SUBST_FILE(f77_rules_frag) +# Checks for BLAS and LAPACK libraries: + +# subdirectories of libcruft to build if they aren't found on the system: +BLAS_DIR="blas" +LAPACK_DIR="lapack" +AC_SUBST(BLAS_DIR) +AC_SUBST(LAPACK_DIR) + +# names of Fortran dgemm & cheev functions to check for (depends upon +# F77 compiler name-mangling scheme): +if test "$octave_cv_f77_uppercase_names" = "yes"; then + if test "$octave_cv_f77_append_underscore" = "yes"; then + dgemm_func=DGEMM_ + cheev_func=CHEEV_ + else + dgemm_func=DGEMM + cheev_func=CHEEV + fi +else + if test "$octave_cv_f77_append_underscore" = "yes"; then + dgemm_func=dgemm_ + cheev_func=cheev_ + else + dgemm_func=dgemm + cheev_func=cheev + 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" +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) +fi + +if test "$blas_save_LIBS" = "$LIBS"; then + # Checks for ATLAS BLAS library: + AC_CHECK_LIB(atlas, ATL_xerbla) + if test "$blas_save_LIBS" != "$LIBS"; then + # check for other atlas libs: + AC_CHECK_LIB(cblas, cblas_dgemm) + AC_CHECK_LIB(f77blas, $dgemm_func, + LIBS="-lf77blas $LIBS", , $FLIBS) + fi +fi + +if test "$blas_save_LIBS" = "$LIBS"; then + # BLAS in Alpha CXML library? + AC_CHECK_LIB(cxml, $dgemm_func, LIBS="-lcxml $LIBS", , $FLIBS) +fi + +if test "$blas_save_LIBS" = "$LIBS"; then + # BLAS in Alpha DXML library? (now called CXML, see above) + AC_CHECK_LIB(dxml, $dgemm_func, LIBS="-ldxml $LIBS", , $FLIBS) +fi + +if test "$blas_save_LIBS" = "$LIBS"; then + # Check for BLAS in Sun Performance library: + AC_CHECK_LIB(sunmath, acosp) + AC_CHECK_LIB(sunperf, $dgemm_func, LIBS="-xlic_lib=sunperf $LIBS") +fi + +if test "$blas_save_LIBS" = "$LIBS"; then + # Check for BLAS in SCSL and SGIMATH libraries (prefer SCSL): + AC_CHECK_LIB(scs, $dgemm_func, + LIBS="-lscs $LIBS", + AC_CHECK_LIB(complib.sgimath, $dgemm_func, + LIBS="-lcomplib.sgimath $LIBS", , $FLIBS), $FLIBS) +fi + +if test "$blas_save_LIBS" = "$LIBS"; 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) +fi + +if test "$blas_save_LIBS" = "$LIBS"; then + # Finally, check for the generic BLAS library: + AC_CHECK_LIB(blas, $dgemm_func, LIBS="-lblas $LIBS", , $FLIBS) +fi + +if test "$blas_save_LIBS" != "$LIBS"; then + BLAS_DIR="" # don't build our own BLAS + +# Check for LAPACK library. Note that ATLAS has its own liblapack.a, +# which is designed to be combined with the real LAPACK. cheev is a +# function in the real LAPACK but not in ATLAS's version, so this +# (hopefully) insures that we are getting the real LAPACK. Note also +# that on some systems, LAPACK is included in the math library +# (e.g. DXML) that we already linked to above...we detect this by +# 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) +fi + ### Handle dynamic linking and shared library options. ### Allow the user to experiment with dynamic linking using dlopen/dlsym. @@ -1190,7 +1294,8 @@ libcruft/odepack/Makefile libcruft/ordered-qz/Makefile \ libcruft/quadpack/Makefile libcruft/ranlib/Makefile \ libcruft/slatec-fn/Makefile libcruft/slatec-err/Makefile \ - libcruft/villad/Makefile) + libcruft/villad/Makefile \ + libcruft/blas-xtra/Makefile libcruft/lapack-xtra/Makefile) AC_OUTPUT_COMMANDS([chmod +x install-octave])