diff --git a/Makefile.am b/Makefile.am index a0bb0a4..f410a78 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,13 +6,15 @@ t_SOURCES = t.cc t2.cc test_SOURCES = test.cc LDADD = libla.a +EXTRA_DIST = LICENSE + # CXXFLAGS += -fno-omit-frame-pointer -O3 -g -fPIC -finline-limit=1000 CXXFLAGS += -DNO_STRASSEN -DFORTRAN_ CXXFLAGS += -DDEBUG -LDFLAGS += $(CBLASOPT) +LDFLAGS += $(CBLASOPT) $(CLAPACKOPT) LDFLAGS += $(CBLASLIB) LDFLAGS += $(TRACEBACKOPT) LDFLAGS += $(TRACEBACKLIB) diff --git a/configure.ac b/configure.ac index 659eaf6..cec29cd 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,11 @@ AC_CHECK_LIB([cblas], [cblas_ddot], [CBLASLIB=-lcblas], [CBLASOPT=-DNONCBLAS]) AC_SUBST([CBLASLIB]) AC_SUBST([CBLASOPT]) +AC_CHECK_LIB([lapack], [clapack_dgesv], , [CLAPACKOPT=-DNONCLAPACK]) +AC_SUBST([CLAPACKOPT]) + + + #the check for traceback needs bfd to be linked into AC_CHECK_LIB([bfd], [bfd_fprintf_vma]) AC_CHECK_LIB([traceback], [sigtraceback], [TRACEBACKLIB="-ltraceback -lbfd" TRACEBACKOPT=-DUSE_TRACEBACK]) diff --git a/noncblas.cc b/noncblas.cc index 1422ae9..6fcb9d0 100644 --- a/noncblas.cc +++ b/noncblas.cc @@ -16,7 +16,6 @@ along with this program. If not, see . */ -#ifdef NONCBLAS #include "noncblas.h" #include "laerror.h" @@ -28,6 +27,7 @@ #define FORNAME(x) x #endif +#ifdef NONCBLAS //Level 1 - straightforward wrappers extern "C" double FORNAME(ddot) (const int *n, const double *x, const int *incx, const double *y, const int *incy); @@ -225,6 +225,17 @@ if(TransA == CblasConjTrans) laerror("zgemv with CblasConjTrans not supportted") FORNAME(zgemv) (TransA==CblasNoTrans?"T":"N", &N, &M, alpha, A, &lda, X, &incX, beta, Y, &incY ); } +extern "C" int FORNAME(idamax) (const int *N, const double *DX, const int *INCX); + +CBLAS_INDEX cblas_idamax(const int N, const double *X, const int incX) +{ +return FORNAME(idamax)(&N,X,&incX); +} + + +#endif + +#ifdef NONCLAPACK //clapack_dgesv //allocate auxiliary storage and transpose input and output quantities to fortran/C order extern "C" void FORNAME(dgesv) (const int *N, const int *NRHS, double *A, const int *LDA, int *IPIV, double *B, const int *LDB, int *INFO); @@ -242,12 +253,5 @@ for(int i=1; i