To build the package, there is no need to run the configure script. Just use the standard cabal commands: runhaskell Setup.lhs configure runhaskell Setup.lhs build runhaskell Setup.lhs install The package uses a script to find what BLAS and LAPACK libraries to link with. To link with a custom BLAS or LAPACK, add the "--with-blas=<lib>" or "--with-lapack=<lib>" argument to --configure-option. For example, runhaskell Setup.lhs configure --configure-option="--with-blas=<lib>" To build this package from the git repository, first run aclocal -I m4 autoreconf