This page gives some information on how to compile and install CLAPACK, the f2c‘ed version of LAPACK, on a Linux system.
From Source
wget http://www.netlib.org/clapack/clapack.tgz
tar xfz clapack.tgz
cd CLAPACK
cp INSTALL/make.inc.LINUX make.inc
make f2clib
Edit make.inc and set BLASLIB to
BLASLIB = ../../libcblaswr.a -L/usr/lib/sse2 -lcblas -latlas
Compile the CBLAS wrapper and the lapack library.
make cblaswrap
make lapacklib
mv lapack_LINUX.a liblapack.a
To avoid having to link the CBLAS wrapper every time you want to use the LAPACK library, you can pack the wrapper’s functions into liblapack.a.
mkdir tmp
cd tmp
ar x ../libcblaswr.a
ar r ../liblapack.a *.o
cd ..
rm -rf tmp