import("libm3")
import("arithmetic")

template("lapack")


% if you import 'blas' functions like 'e_wsfe' cannot be found
% if you then switch to 'gslcblas', compile, switch back to 'blas'
% then it can be compiled
%import_lib("blas","/usr/lib")

% needed for blas and lapack, part of the f2c package, I guess
%import_lib("g2c","/usr/lib")
%import_lib("blas","/usr/lib")
%import_lib("lapack","/usr/lib")

% inserted to cm3.cfg:
%     "BLAS-LAPACK": [ "-L/usr/lib", "-lg2c", "-lblas", "-llapack" ]
import_sys_lib("BLAS-LAPACK")


%LAPACKToModula3("Real",     "Real",     "MatrixLapackRaw", "s", "S")
%LAPACKToModula3("LongReal", "LongReal", "MatrixLapackRaw", "d", "D")
Generic_module("FloatMatrixLapack")
Lapack("Real",     "RealBasic")
Lapack("LongReal", "LongRealBasic")


% from arithmetic
Functional("RealLapack",     "Real",     "Basic", "Lapack")
Functional("LongRealLapack", "LongReal", "Basic", "Lapack")
%Functional("ExtendedLapack", "Extended", "Basic", "Lapack")

library("m3lapack")
