Index: /issm/trunk/src/c/solutions/controltao_core.cpp
===================================================================
--- /issm/trunk/src/c/solutions/controltao_core.cpp	(revision 10051)
+++ /issm/trunk/src/c/solutions/controltao_core.cpp	(revision 10052)
@@ -2,4 +2,5 @@
  * \brief: core of the control solution 
  */ 
+#include <config.h>
 #include "../toolkits/toolkits.h"
 #include "../objects/objects.h"
@@ -13,5 +14,5 @@
 
 
-#ifdef _HAVE_TAO_
+#if defined (_HAVE_TAO_) && (_PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2))
 #include "tao.h"
 
@@ -135,5 +136,5 @@
 #else
 void controltao_core(FemModel* femmodel){
-	_error_("TAO not installed");
+	_error_("TAO not installed or PETSc version not supported");
 }
 #endif //_HAVE_TAO_ 
