Index: issm/trunk-jpl/m4/issm_options.m4
===================================================================
--- issm/trunk-jpl/m4/issm_options.m4	(revision 15181)
+++ issm/trunk-jpl/m4/issm_options.m4	(revision 15239)
@@ -185,4 +185,5 @@
 		fi
 		fi
+
 		AC_MSG_RESULT($DAKOTA_VERSION)
 		AC_DEFINE_UNQUOTED([_DAKOTA_VERSION_],"$DAKOTA_VERSION",[Dakota version number])
@@ -204,5 +205,5 @@
 				else if test x$DAKOTA_VERSION = x5.1 || test x$DAKOTA_VERSION = x5.2; then
 					DAKOTALIB="-L$DAKOTA_ROOT/lib -ldakota -lteuchos -lpecos -llhs -lsparsegrid -lsurfpack -lconmin -lddace -lfsudace -ljega -lcport -loptpp -lpsuade -lncsuopt -lcolin -linterfaces -lmomh -lscolib -lpebbl -ltinyxml -lutilib -l3po -lhopspack -lnidr -lamplsolver -lboost_signals -lboost_regex -lboost_filesystem -lboost_system -ldl"
-				else if test x$DAKOTA_VERSION = x5.3; then
+				else if test x$DAKOTA_VERSION = x5.3 || test x$DAKOTA_VERSION = x5.3.1; then
 					DAKOTAFLAGS="-DDISABLE_DAKOTA_CONFIG_H -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DDAKOTA_PLUGIN -DBOOST_DISABLE_ASSERTS -DDAKOTA_HAVE_BOOST_FS -DHAVE_UNISTD_H -DHAVE_SYSTEM -DHAVE_WORKING_FORK -DHAVE_WORKING_VFORK -DHAVE_SYS_WAIT_H -DHAVE_USLEEP -DDAKOTA_F90 -DDAKOTA_HAVE_MPI -DHAVE_PECOS -DHAVE_SURFPACK -DDAKOTA_COLINY -DDAKOTA_UTILIB -DHAVE_ADAPTIVE_SAMPLING -DHAVE_CONMIN -DDAKOTA_DDACE -DHAVE_FSUDACE -DDAKOTA_HOPS -DHAVE_JEGA -DHAVE_NCSU -DHAVE_NL2SOL -DHAVE_OPTPP -DDAKOTA_OPTPP -DHAVE_PSUADE -DHAVE_AMPL"
 					DAKOTALIB="-L$DAKOTA_ROOT/lib -ldakota_src -ldakota_src_fortran -lnidr -lteuchos -lpecos -lpecos_src -llhs -lmods -lmod -ldfftpack -lsparsegrid -lsurfpack -lsurfpack_fortran -lutilib -lcolin -linterfaces -lscolib -l3po -lpebbl -ltinyxml -lconmin -ldace -lanalyzer -lrandom -lsampling -lbose -lfsudace -lhopspack -ljega -ljega_fe -lmoga -lsoga -leutils -lutilities -lncsuopt -lcport -loptpp -lpsuade -lamplsolver"
@@ -227,26 +228,50 @@
 		esac
 		AC_DEFINE([_HAVE_DAKOTA_],[1],[with Dakota in ISSM src])
-		AC_MSG_CHECKING(for dakota major version)
-		if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.C"; then
-			DAKOTA_MAJOR=`cat $DAKOTA_ROOT/../src/src/CommandLineHandler.C | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' | sed 's/\..*//' `
-		else if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.cpp"; then
-			DAKOTA_MAJOR=`cat $DAKOTA_ROOT/../src/src/CommandLineHandler.cpp | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' | sed 's/\..*//' `
-		else
-			AC_MSG_ERROR([Dakota CommandLineHandler.C or CommandLineHandler.cpp file not found to determine DAKOTA_MAJOR!]);
-		fi
-		fi
-		AC_MSG_RESULT($DAKOTA_MAJOR)
-		AC_DEFINE_UNQUOTED([_DAKOTA_MAJOR_],$DAKOTA_MAJOR,[Dakota major version number])
-		AC_MSG_CHECKING(for dakota minor version)
-		if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.C"; then
-			DAKOTA_MINOR=`cat $DAKOTA_ROOT/../src/src/CommandLineHandler.C | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' | sed 's/.*\.//' | sed 's/+//' `
-		else if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.cpp"; then
-			DAKOTA_MINOR=`cat $DAKOTA_ROOT/../src/src/CommandLineHandler.cpp | grep 'DAKOTA version' | grep 'release' | grep -v // | sed 's/.*DAKOTA version //' | sed 's/ .*//' | sed 's/.*\.//' | sed 's/+//' `
-		else
-			AC_MSG_ERROR([Dakota CommandLineHandler.C or CommandLineHandler.cpp file not found to determine DAKOTA_MINOR!]);
-		fi
-		fi
-		AC_MSG_RESULT($DAKOTA_MINOR)
-		AC_DEFINE_UNQUOTED([_DAKOTA_MINOR_],$DAKOTA_MINOR,[Dakota minor version number])
+
+		case $DAKOTA_VERSION in
+			*.*.*) 
+				AC_MSG_CHECKING(for dakota major version)
+				DAKOTA_MAJOR=`echo $DAKOTA_VERSION | sed 's%\([0-9]*\).*%\1%' `
+				AC_MSG_RESULT($DAKOTA_MAJOR)
+				AC_DEFINE_UNQUOTED([_DAKOTA_MAJOR_],$DAKOTA_MAJOR,[Dakota major version number])
+				AC_MSG_CHECKING(for dakota minor version)
+				DAKOTA_MINOR=`echo $DAKOTA_VERSION | sed 's%[0-9]*\.\([0-9]*\).*%\1%' `
+				AC_MSG_RESULT($DAKOTA_MINOR)
+				AC_DEFINE_UNQUOTED([_DAKOTA_MINOR_],$DAKOTA_MINOR,[Dakota minor version number])
+				AC_MSG_CHECKING(for dakota patch version)
+				DAKOTA_PATCH=`echo $DAKOTA_VERSION | sed 's%[0-9]*\.[0-9]*\.\([0-9]*\).*%\1%' `
+				AC_MSG_RESULT($DAKOTA_PATCH)
+				AC_DEFINE_UNQUOTED([_DAKOTA_PATCH_],$DAKOTA_PATCH,[Dakota patch version number])
+			;;
+			*.*)
+				AC_MSG_CHECKING(for dakota major version)
+				DAKOTA_MAJOR=`echo $DAKOTA_VERSION | sed 's%\([0-9]*\).*%\1%' `
+				AC_MSG_RESULT($DAKOTA_MAJOR)
+				AC_DEFINE_UNQUOTED([_DAKOTA_MAJOR_],$DAKOTA_MAJOR,[Dakota major version number])
+				AC_MSG_CHECKING(for dakota minor version)
+				DAKOTA_MINOR=`echo $DAKOTA_VERSION | sed 's%[0-9]*\.\([0-9]*\).*%\1%' `
+				AC_MSG_RESULT($DAKOTA_MINOR)
+				AC_DEFINE_UNQUOTED([_DAKOTA_MINOR_],$DAKOTA_MINOR,[Dakota minor version number])
+				AC_MSG_CHECKING(for dakota patch version)
+				DAKOTA_PATCH=0
+				AC_MSG_RESULT($DAKOTA_PATCH)
+				AC_DEFINE_UNQUOTED([_DAKOTA_PATCH_],$DAKOTA_PATCH,[Dakota patch version number])
+			;;
+			*) 
+				AC_MSG_CHECKING(for dakota major version)
+				DAKOTA_MAJOR=`echo $DAKOTA_VERSION | sed 's%\([0-9]*\).*%\1%' `
+				AC_MSG_RESULT($DAKOTA_MAJOR)
+				AC_DEFINE_UNQUOTED([_DAKOTA_MAJOR_],$DAKOTA_MAJOR,[Dakota major version number])
+				AC_MSG_CHECKING(for dakota minor version)
+				DAKOTA_MINOR=0
+				AC_MSG_RESULT($DAKOTA_MINOR)
+				AC_DEFINE_UNQUOTED([_DAKOTA_MINOR_],$DAKOTA_MINOR,[Dakota minor version number])
+				AC_MSG_CHECKING(for dakota patch version)
+				DAKOTA_PATCH=0
+				AC_MSG_RESULT($DAKOTA_PATCH)
+				AC_DEFINE_UNQUOTED([_DAKOTA_PATCH_],$DAKOTA_PATCH,[Dakota patch version number])
+			;;
+		esac
+
 		AC_SUBST([DAKOTAINCL])
 		AC_SUBST([DAKOTAFLAGS])
@@ -257,4 +282,5 @@
 		AC_MSG_RESULT($HAVE_DAKOTA)
 	fi
+
 	AM_CONDITIONAL([DAKOTA], [test x$HAVE_DAKOTA = xyes])
 	dnl }}}
