Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 18225)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 18226)
@@ -939,21 +939,30 @@
 	dnl Check whether tao is enabled
 	AC_MSG_CHECKING([for tao])
-	if test "x$TAO_ROOT" = "xno" ; then
-		HAVE_TAO=no
-	else
-		HAVE_TAO=yes
-		if ! test -d "$TAO_ROOT"; then
-			AC_MSG_ERROR([tao directory provided ($TAO_ROOT) does not exist]);
-		fi
-	fi
-	AC_MSG_RESULT($HAVE_TAO)
-	
-	dnl tao headers and libraries
-	if test "x$HAVE_TAO" == "xyes"; then
-	  TAOINCL="-I$TAO_ROOT/ -I$TAO_ROOT/include -I$TAO_ROOT/bmake/ "
-	  TAOLIB="-L$TAO_ROOT/lib -ltao -lpetsc"
-	  AC_DEFINE([_HAVE_TAO_],[1],[with Tao in ISSM src])
-	  AC_SUBST([TAOINCL])
-	  AC_SUBST([TAOLIB])
+
+	if test "$HAVE_PETSC" = "yes" && test "x$PETSC_MAJOR" = "x3" && test $PETSC_MINOR -ge 5; then
+		dnl in petsc >=3.5, tao is provided
+		HAVE_TAO="yes"
+		AC_DEFINE([_HAVE_TAO_],[1],[with Tao in ISSM src])
+		AC_MSG_RESULT($HAVE_TAO)
+	else
+
+		if test "x$TAO_ROOT" = "xno" ; then
+			HAVE_TAO=no
+		else
+			HAVE_TAO=yes
+			if ! test -d "$TAO_ROOT"; then
+				AC_MSG_ERROR([tao directory provided ($TAO_ROOT) does not exist]);
+			fi
+		fi
+		AC_MSG_RESULT($HAVE_TAO)
+
+		dnl tao headers and libraries
+		if test "x$HAVE_TAO" == "xyes"; then
+		  TAOINCL="-I$TAO_ROOT/ -I$TAO_ROOT/include -I$TAO_ROOT/bmake/ "
+		  TAOLIB="-L$TAO_ROOT/lib -ltao -lpetsc"
+		  AC_DEFINE([_HAVE_TAO_],[1],[with Tao in ISSM src])
+		  AC_SUBST([TAOINCL])
+		  AC_SUBST([TAOLIB])
+		fi
 	fi
 	dnl }}}
