Index: /issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- /issm/trunk-jpl/m4/issm_options.m4	(revision 15681)
+++ /issm/trunk-jpl/m4/issm_options.m4	(revision 15682)
@@ -119,6 +119,6 @@
 
 		AC_DEFINE([_HAVE_MATLAB_],[1],[with matlab in ISSM src])
-		AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT)
   		MATLABINCL="-I$MATLAB_ROOT/extern/include/"
+		AC_CHECK_FILE($MATLAB_ROOT/extern/include/mex.h,[],[AC_MSG_ERROR([Couldn't find mex.h... check your installation of matlab])])
 		
 		dnl 4. get MEXLIB MEXLINK and MEXEXT (experimental) except for windows
@@ -141,5 +141,4 @@
   			;;
       esac
-	   AC_MSG_RESULT(done)
 		AC_SUBST([MATLABINCL])
 		AC_SUBST([MEX])
@@ -171,4 +170,5 @@
 	if test "x$HAVE_TRIANGLE" = "xyes"; then
 		TRIANGLEINCL=-I$TRIANGLE_ROOT/
+		AC_CHECK_HEADER($TRIANGLE_ROOT/triangle.h,[],[AC_MSG_ERROR([Couldn't find triangle.h... check your installation of triangle])])
 		case "${host_os}" in
 				*cygwin*)
