As noted in other comments, your system has a LAPACK ATLAS implementation. The correct library linking order (for a threaded version of ATLAS) is as follows:
-llapack -lf77blas -lcblas -latlas
Also note that your Fortran code also seems to contain a subroutine from the NAG library (x04cef), so you will also need to link the NAG library.
source share