Index: /issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m
===================================================================
--- /issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m	(revision 27144)
+++ /issm/trunk-jpl/src/m/mesh/planet/gmsh/gmshplanet.m	(revision 27145)
@@ -19,4 +19,15 @@
 	if s~=0,
 		error(r);
+	elseif isempty(r),
+		% If this function is called from one of our distributable packages, we 
+		% need to do a bit more to find the Gmsh executable
+		[filepath,name,ext]=fileparts(which('gmsh.'));
+		setenv('PATH',[filepath ':' getenv('PATH')])
+		[s,r]=system(['gmsh -info 2>&1 | command grep ''Version'' | sed -e ''s/Version[[:blank:]]*:[[:blank:]]//'' | cut -d ''.'' -f1']);
+		if s~=0,
+			error(r);
+		elseif isempty(r),
+			error('gmshplanet: Gmsh executable not found!');
+		end
 	end
 	gmshmajorversion=str2num(r);
