Index: /issm/trunk-jpl/externalpackages/emscripten/install.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/emscripten/install.sh	(revision 21925)
+++ /issm/trunk-jpl/externalpackages/emscripten/install.sh	(revision 21926)
@@ -20,2 +20,8 @@
 ./emsdk install latest
 ./emsdk activate latest
+
+cd ../
+mv src install
+cd install
+
+source ./emsdk_env.sh
Index: /issm/trunk-jpl/jenkins/jenkins.sh
===================================================================
--- /issm/trunk-jpl/jenkins/jenkins.sh	(revision 21925)
+++ /issm/trunk-jpl/jenkins/jenkins.sh	(revision 21926)
@@ -30,4 +30,5 @@
 MATLAB_TEST=0
 PYTHON_TEST=0
+JAVASCRIPT_TEST=0
 
 #source configuration script
@@ -141,5 +142,5 @@
 
 	#install if requested or if previous install has not been successful
-	if [ "$ISSM_EXTERNALPACKAGES" == "yes" ] || [ ! -d ./install ] || [ ! "$(ls -A ./install)" ]; then
+	if [ "$ISSM_EXTERNALPACKAGES" == "yes" ] || [ ! -d ./install -a ! -d ./install-javascript ] || ([ -d ./install ] && [ ! "$(ls -A ./install)" ]) || ([ -d ./install-javascript ] && [ ! "$(ls -A ./install-javascript)" ]); then
 		echo "======================================================";
 		echo "       Installing $PACKAGENAME                        ";
@@ -181,8 +182,15 @@
 fi
 
+#Set CXX/CC flags for JS runs after exnteralpackages to avoid conflicts during their compilation
+CXX_PREVIOUS=$CXX
+CC_PREVIOUS=$CC
+if [ $JAVASCRIPT_TEST -eq 1 ]; then
+	export CXX=em++
+	export CC=emcc
+fi
+
 source $ISSM_DIR/etc/environment.sh
 
-if [ "$OS" == "win" ]
-then
+if [ "$OS" == "win" ]; then
 	echo " == WINDOWS ENVIRONMENT DETECTED =="
 	source $ISSM_DIR/externalpackages/windows/windows_environment.sh
@@ -238,4 +246,8 @@
 #}}}
 
+#Restore CXX/CC to their previous values 
+export CXX=$CXX_PREVIOUS
+export CC=$CC_PREVIOUS
+
 #matlab tests
 # {{{
Index: /issm/trunk-jpl/jenkins/linux64_ross_javascript
===================================================================
--- /issm/trunk-jpl/jenkins/linux64_ross_javascript	(revision 21925)
+++ /issm/trunk-jpl/jenkins/linux64_ross_javascript	(revision 21926)
@@ -24,8 +24,10 @@
 
 #List of external pakages to be installed and their installation scripts
-EXTERNALPACKAGES="gsl			  install-javascript.sh    
+EXTERNALPACKAGES="autotools     install.sh
+						cmake         install.sh
+						emscripten    install.sh        
+						gsl           install-javascript.sh    
 						triangle      install-javascript.sh        
-						shell2junit   install.sh
-						emscripten	  install.sh"
+						shell2junit   install.sh"
 
 #-----------------#
Index: /issm/trunk-jpl/src/m/Makefile.am
===================================================================
--- /issm/trunk-jpl/src/m/Makefile.am	(revision 21925)
+++ /issm/trunk-jpl/src/m/Makefile.am	(revision 21926)
@@ -135,7 +135,5 @@
 				${ISSM_DIR}/src/m/io/savemodel.js \
 				${ISSM_DIR}/src/m/io/loadmodel.js \
-				${ISSM_DIR}/src/m/io/saveAsFile.js \
 				${ISSM_DIR}/src/m/io/writetofile.js \
-				${ISSM_DIR}/src/m/io/download.js \
 				${ISSM_DIR}/src/m/io/writetofile.js \
 				${ISSM_DIR}/src/m/materials/paterson.js \
