Index: /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 13734)
+++ /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 13735)
@@ -11,10 +11,12 @@
 #include "../../EnumDefinitions/EnumDefinitions.h"
 /*ANSI_DECLARATORS needed to call triangle library: */
-#ifndef ANSI_DECLARATORS
-#define ANSI_DECLARATORS
-#include "triangle.h"
-#undef ANSI_DECLARATORS
-#else
-#include "triangle.h"
+#if defined(_HAVE_TRIANGLE_)
+	#ifndef ANSI_DECLARATORS
+	#define ANSI_DECLARATORS
+	#include "triangle.h"
+	#undef ANSI_DECLARATORS
+	#else
+	#include "triangle.h"
+	#endif
 #endif
 /*}}}*/
@@ -22,4 +24,7 @@
 void TriMeshx(SeqMat<IssmPDouble>** pindex,SeqVec<IssmPDouble>** px,SeqVec<IssmPDouble>** py,SeqMat<IssmPDouble>** psegments,SeqVec<IssmPDouble>** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
 
+#if !defined(_HAVE_TRIANGLE_)
+	_error_("triangle has not been installed");
+#else
 	/*indexing: */
 	int i,j;
@@ -201,3 +206,4 @@
 	*py=new SeqVec<IssmPDouble>(y,out.numberofpoints);
 	*psegmentmarkerlist=new SeqVec<IssmPDouble>(segmentmarkerlist,out.numberofsegments);
+#endif
 }
