@@ -0,0 +1,37 @@
1+--- a/CMakeLists.txt
2++++ b/CMakeLists.txt
3+@@ -324,25 +324,16 @@
4+ set_config_option(HAVE_BLAS "Blas(IntelMKL)")
5+ set_config_option(HAVE_LAPACK "Lapack(IntelMKL)")
6+ else(LAPACK_LIBRARIES)
7+- # on Linux also try to find ATLAS without a Fortran compiler, because
8+- # cmake ships with a buggy FindBLAS e.g. on Ubuntu Lucid Lynx
9+- set(ATLAS_LIBS_REQUIRED lapack f77blas cblas atlas)
10+- find_all_libraries(LAPACK_LIBRARIES ATLAS_LIBS_REQUIRED "" "")
11++ # try with generic names
12++ set(GENERIC_LIBS_REQUIRED lapack blas pthread)
13++ find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "")
14+ if(LAPACK_LIBRARIES)
15+- set_config_option(HAVE_BLAS "Blas(ATLAS)")
16+- set_config_option(HAVE_LAPACK "Lapack(ATLAS)")
17+- else(LAPACK_LIBRARIES)
18+- # try with generic names
19+- set(GENERIC_LIBS_REQUIRED lapack blas pthread)
20+- find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "")
21+- if(LAPACK_LIBRARIES)
22+- set_config_option(HAVE_BLAS "Blas(Generic)")
23+- set_config_option(HAVE_LAPACK "Lapack(Generic)")
24+- find_library(GFORTRAN_LIB gfortran)
25+- if(GFORTRAN_LIB)
26+- list(APPEND LAPACK_LIBRARIES ${GFORTRAN_LIB})
27+- endif(GFORTRAN_LIB)
28+- endif(LAPACK_LIBRARIES)
29++ set_config_option(HAVE_BLAS "Blas(Generic)")
30++ set_config_option(HAVE_LAPACK "Lapack(Generic)")
31++ find_library(GFORTRAN_LIB gfortran)
32++ if(GFORTRAN_LIB)
33++ list(APPEND LAPACK_LIBRARIES ${GFORTRAN_LIB})
34++ endif(GFORTRAN_LIB)
35+ endif(LAPACK_LIBRARIES)
36+ endif(LAPACK_LIBRARIES)
37+ elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")