Please find attached a patch fixing three issues:
Try to detect lapack through pkg-config
The lib might not be named liblapack.so, so the current check wouldn't detect it correctly. In addition we might have the possibility to use pkgconfig to detect lapack/blas.
Don't automagically build docs if doxygen is found, but use enable-dic for this
Don't test for pkg-config as libsndfile and libsamplerate are always required.