JuliaLang/julia — pull request #3628 by KDr2 (2013-07-05 01:08:37+00:00)
Title: Kd/libblas

Hi there, the reasons for mading these minor changes are:

* To use system provided libblas/libopenblas on Linux x64:
Julia use 64-bit blas libraries by default on 64-bit architectures, but unfortunately the system provided blas libraries on Linux x64 is configured without `USE64BITINT`, so it'd better to give a chance to set `USE_BLAS64=0` in `Make.usr`.

* To use system provided libopenblas certainly on Linux:
I installed both `libblas-dev` and `libopenblas-dev` on my Linux box(Debian x64), and the shared object files `/usr/lib/libblas.so*` are finally linked to libopenblas' shared objects(by the packages alternatives mechanism). So when I set `USE_SYSTEM_BLAS=1`, Julia use the system provided libopenblas, this is OK except that the function `versioninfo` says it's using libblas(but libopenblas actually).
And, yesterday I updated the alternative of libblas.so from `/usr/lib/openblas-base/libopenblas.so` to `/usr/lib/libblas/libblas.so` for some purposes regardless of Julia. After doing this, Julia can not use the system provided libopenblas by setting `USE_SYSTEM_BLAS=1` , so I add a var `USE_SYSTEM_OPENBLAS` to make Julia using the system provided libopenblas in this scenario.

Now, Julia can be built successfully on Linux x64 using the system provide libopenblas certainly by putting these lines in `Make.usr`:

```
#USE_SYSTEM_BLAS=1
USE_SYSTEM_OPENBLAS=1
#OPENBLAS_PATH=/usr/lib/openblas-base # this is set by default
USE_BLAS64=0
```

And, the function `versioninfo` can tell the `BLAS` is `libopenblas (NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY)` but not `libblas` now.