Index: /issm/trunk-jpl/externalpackages/dakota/configs/5.3.1/BuildDakotaCustom.cmake.mac.patch
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/configs/5.3.1/BuildDakotaCustom.cmake.mac.patch	(revision 18304)
+++ /issm/trunk-jpl/externalpackages/dakota/configs/5.3.1/BuildDakotaCustom.cmake.mac.patch	(revision 18304)
@@ -0,0 +1,14 @@
+64,65c64,65
+< #set( DAKOTA_HAVE MPI ON
+< #     CACHE BOOL "Build with MPI enabled" FORCE)
+---
+> set( DAKOTA_HAVE MPI OFF
+>      CACHE BOOL "Build with MPI disabled" FORCE)
+91,93c91,93
+< #set( CMAKE_INSTALL_PREFIX
+< #     "/path/to/Dakota/installation"
+< #     CACHE PATH "Path to Dakota installation" )
+---
+> set( CMAKE_INSTALL_PREFIX
+>      "$ENV{ISSM_DIR}/externalpackages/dakota/install"
+>      CACHE PATH "Path to Dakota installation" )
Index: /issm/trunk-jpl/externalpackages/dakota/configs/5.3.1/CMakeLists.txt.patch
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/configs/5.3.1/CMakeLists.txt.patch	(revision 18304)
+++ /issm/trunk-jpl/externalpackages/dakota/configs/5.3.1/CMakeLists.txt.patch	(revision 18304)
@@ -0,0 +1,4 @@
+47a48,50
+> set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries" FORCE)
+> set(BUILD_SHARED_LIBS OFF CACHE BOOL "Set to ON to build DSO libraries" FORCE)
+> 
Index: /issm/trunk-jpl/externalpackages/dakota/install-5.3.1-macosx64.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/dakota/install-5.3.1-macosx64.sh	(revision 18303)
+++ /issm/trunk-jpl/externalpackages/dakota/install-5.3.1-macosx64.sh	(revision 18304)
@@ -23,6 +23,7 @@
 export DAK_BUILD=$ISSM_DIR/externalpackages/dakota/build
 cp $DAK_SRC/cmake/BuildDakotaTemplate.cmake $DAK_SRC/cmake/BuildDakotaCustom.cmake
-patch $DAK_SRC/cmake/BuildDakotaCustom.cmake configs/5.3.1/BuildDakotaCustom.cmake.patch
+patch $DAK_SRC/cmake/BuildDakotaCustom.cmake configs/5.3.1/BuildDakotaCustom.cmake.mac.patch
 patch $DAK_SRC/cmake/DakotaDev.cmake configs/5.3.1/DakotaDev.cmake.patch
+patch $DAK_SRC/CMakeLists.txt configs/5.3.1/CMakeLists.txt.patch
 
 #Apply patches
@@ -33,7 +34,18 @@
 patch src/packages/pecos/src/pecos_global_defs.hpp configs/5.3.1/pecos_global_defs.hpp.patch
 
+export BOOST_ROOT=$ISSM_DIR/externalpackages/boost/install
+
 #Configure dakota
+# Set your local gcc compiler here
 cd $DAK_BUILD
-cmake -D CMAKE_C_COMPILER=/usr/local/gfortran/bin/x86_64-apple-darwin10-gcc -D CMAKE_CXX_COMPILER=/usr/local/gfortran/bin/x86_64-apple-darwin10-g++ -D CMAKE_Fortran_COMPILER=/usr/local/gfortran/bin/x86_64-apple-darwin10-gfortran -C $DAK_SRC/cmake/BuildDakotaCustom.cmake -C $DAK_SRC/cmake/DakotaDev.cmake $DAK_SRC
+cmake -DBoost_NO_BOOST_CMAKE=TRUE \
+    -DBoost_NO_SYSTEM_PATHS=TRUE \
+    -DBOOST_ROOT:PATHNAME=$BOOST_ROOT \
+    -DBoost_LIBRARY_DIRS:FILEPATH=${BOOST_ROOT}/lib \
+	 -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc \
+    -C $DAK_SRC/cmake/BuildDakotaCustom.cmake -C $DAK_SRC/cmake/DakotaDev.cmake $DAK_SRC
+
+#-DCMAKE_CXX_COMPILER=/usr/local/gfortran/bin/x86_64-apple-darwin10-g++ -DCMAKE_Fortran_COMPILER=/usr/local/gfortran/bin/x86_64-apple-darwin10-gfortran
+
 cd ..
 
