What Linux distro?  If you're on an unusual distro  You might just need to patch the build process to look up the right names. 

Also have you contacted the hmatrix maintainer to ask him for help. HMATRIX does have an issue tracker on github etc

On Friday, August 22, 2014, Adrian Victor Crisciu <acrisciu@gmail.com> wrote:
I tried the following command line:

cabal install --enable-documentation --extra-include-dirs=/usr;local/include --extra-lib-dirs=/usr/local/lib hmatrix

and got the following:

Resolving dependencies...
Configuring hmatrix-0.16.0.4...
cabal: Missing dependencies on foreign libraries:
* Missing C libraries: blas, lapack
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
Failed to install hmatrix-0.16.0.4
cabal: Error: some packages failed to install:
hmatrix-0.16.0.4 failed during the configure step. The exception was:
ExitFailure 1

As I said before, the libraries for blas and lapack ARE in /usr/local/lib and the header files ARE in /usr/local/include.

Is it possible for hmatrix to look for another version of atlas/blas and lapack? I have installed atlas-3.3.8 and lapack-3.4.0

Adrian.