diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c6bb65e9f66731d69d689dfee8ab89ac00b86db..5ef76c272053f440960c0d12167f01c38cd0b192 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -914,6 +914,12 @@ if(HAVE_SOLVER)
       endif(NOT PETSC_LIBS)
       if(PETSC_LIBS)
         set_config_option(HAVE_PETSC "PETSc")
+	if(NOT HAVE_BLAS)
+          set_config_option(HAVE_BLAS "Blas(PETSc)")
+        endif(NOT HAVE_BLAS)
+	if(NOT HAVE_LAPACK)
+          set_config_option(HAVE_LAPACK "Lapack(PETSc)")
+        endif(NOT HAVE_LAPACK)
       endif(PETSC_LIBS)
       # find slepc (needs to be linked in before petsc)
       if(ENABLE_SLEPC)