diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd7ea8784e3b83e31e807ed8b956bb5ff64245c1..c0bfad1385208a358d63925b0e45d412e098047e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -260,6 +260,14 @@ if(ENABLE_BLAS_LAPACK)
       if(LAPACK_LIBRARIES)
         set_config_option(HAVE_BLAS "Blas(ATLAS)")
         set_config_option(HAVE_LAPACK "Lapack(ATLAS)")
+      else(LAPACK_LIBRARIES)
+        # try with generic names
+        set(GENERIC_LIBS_REQUIRED lapack blas pthread)
+        find_all_libraries(LAPACK_LIBRARIES GENERIC_LIBS_REQUIRED "" "")
+        if(LAPACK_LIBRARIES)
+          set_config_option(HAVE_BLAS "Blas(Generic)")
+          set_config_option(HAVE_LAPACK "Lapack(Generic)")
+        endif(LAPACK_LIBRARIES)
       endif(LAPACK_LIBRARIES)
     endif(LAPACK_LIBRARIES)
   elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")