Index: /issm/trunk-jpl/externalpackages/android/android_aux.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/android/android_aux.sh	(revision 12845)
+++ /issm/trunk-jpl/externalpackages/android/android_aux.sh	(revision 12846)
@@ -22,5 +22,5 @@
         step=${BASH_REMATCH[1]}; 
         echo "Setting step to: " $step
-    elif [[ "$arg" =~ -j=([0-9])* ]]; then
+    elif [[ "$arg" =~ -j=([1-9]+[0-9]*) || "$arg" =~ ([1-9]+[0-9]*) ]]; then
         j=${BASH_REMATCH[1]}; 
         echo "Number of jobs set to: " $j
Index: /issm/trunk-jpl/externalpackages/gsl/install-android.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/gsl/install-android.sh	(revision 12845)
+++ /issm/trunk-jpl/externalpackages/gsl/install-android.sh	(revision 12846)
@@ -24,5 +24,5 @@
     cd src
     
-    autoreconf -iv --force -I "$ISSM_DIR/m4/"
+    autoreconf -iv --force -I $LIBTOOL_DIR/share/aclocal/ 
 
     ./configure \
@@ -35,7 +35,7 @@
 if [[ $step == "3" || $step == "0" ]]; then
     if [ -z $1 ]; then
-	    make 12
+	    make $j 
     else
-	    make -j 12
+	    make -j $j 
     fi
 
Index: /issm/trunk-jpl/externalpackages/libtool/install.sh
===================================================================
--- /issm/trunk-jpl/externalpackages/libtool/install.sh	(revision 12845)
+++ /issm/trunk-jpl/externalpackages/libtool/install.sh	(revision 12846)
@@ -2,15 +2,17 @@
 
 #Some cleanup
-rm -rf install libtool-2.2.6b src
+rm -rf install libtool[\w.- ]* src
 mkdir install
 
 #Download from ISSM server
-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libtool-2.2.6b.tar.gz' 'libtool-2.2.6b.tar.gz'
+$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libtool' 'libtool'
 
 #Untar 
-tar -zxvf  libtool-2.2.6b.tar.gz
+tar -zxvf  libtool[\w.-]*.tar.gz
+rm libtool[\w.-]*.tar.gz
+
 
 #Move libtool into src directory
-mv libtool-2.2.6b src
+mv libtool[\w.-]* src
 
 #Compile libtool
Index: /issm/trunk-jpl/externalpackages/triangle/configs/android/configure.make
===================================================================
--- /issm/trunk-jpl/externalpackages/triangle/configs/android/configure.make	(revision 12845)
+++ /issm/trunk-jpl/externalpackages/triangle/configs/android/configure.make	(revision 12846)
@@ -1,6 +1,6 @@
 # This makefile configures build process to cross-compile to the android platform.
-# The binary tools referenced below are specifically configuered to target armeabi-v7a.
+# The binary tools referenced below are specifically configured to target armeabi-v7a.
 # Furthermore, the compilers (which are simply wrappers around GNU GCC) are set to
-# produce binaries that are EABI complient.
+# produce binaries that are EABI compliant.
 #
 # Note that the AAPCS standard defines 'EABI' as a moniker used to specify
@@ -9,4 +9,7 @@
 #
 # http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf
+
+source $ANDROID_DIR/android_aux.sh
+
 CC=${toolchain_path}-gcc
 AR=${toolchain_path}-ar
Index: /issm/trunk-jpl/scripts/DownloadExternalPackage.py
===================================================================
--- /issm/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12845)
+++ /issm/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12846)
@@ -2,36 +2,60 @@
 # -*- coding: ISO-8859-1 -*-
 
-import os,sys
+import os,sys,re
 import urllib
+from HTMLParser import HTMLParser
+from urllib import FancyURLopener
 
-#Check inputs
-if(len(sys.argv)!=3): raise NameError('usage: ./DownloadExternalPackage.py URL localfile')
+# Start class myHTMLParser
+class MyHTMLParser(HTMLParser):
 
-url=sys.argv[1];
+    def __init__(self, pattern):
+        HTMLParser.__init__(self)
+        self.matcher = re.compile(pattern) 
+        self.targets = []
+
+    def handle_starttag(self, tag, attrs):
+        for i in attrs:
+            if "href" == i[0] and str(self.matcher.match(i[1])) != "None":
+                self.targets.append(i[1])
+# End class myHTMLParser
+
+pivot = sys.argv[1].rfind("/")
+url = (sys.argv[1])[:pivot]
 localFile=sys.argv[2]
 
-#Remove file if it already exists
-if os.path.exists(localFile):
-	print "File "+ localFile +" already exists and will not be downloaded..."
-	sys.exit()
+pivot += 1;
+find = (sys.argv[1])[pivot:];
+print "Looking for " + find
+pattern = find + "[\w.-]*(\.tar\.gz|tar\.gz2|tgz|zip|exe)?"
+parser = MyHTMLParser(pattern)
 
-#Try to download from url
-httpfail=-1
-try:
-	print "Fetching %s" % localFile
-	urllib.urlretrieve(url,localFile)
-	httpfail=0
-except Exception, e:
-	httpfail=1
+urlObject = FancyURLopener()
+obj = urlObject.open(url)
+parser.feed(obj.read())
 
-#Error message in case it failed
-if (httpfail):
-	failureMessage = '''
-===========================================================================
-Unable to download package %s from: %s
-* If URL specified manually - perhaps there is a typo?
-* If your network is disconnected - please reconnect 
-* Alternatively, you can download the above URL manually
-===========================================================================
-''' % (localFile,url)
-	raise RuntimeError(failureMessage)
+if len(parser.targets) > 1:
+    print "Could not resolve your download due to the number of hits."
+    print "Refine your search."
+    for i in parser.targets:
+        print i
+
+elif len(parser.targets) == 1:
+    url += "/" + parser.targets[0]
+    if os.path.exists(localFile): 
+        print "File "+ localFile +" already exists and will not be downloaded..."
+    elif parser.targets[0] == localFile:
+        urllib.urlretrieve(url, localFile)
+        print "Found: " + parser.targets[0]
+    elif parser.matcher.match(localFile) != "None":
+        urllib.urlretrieve(url,parser.targets[0]);
+        print "Found: " + parser.targets[0]
+    else:
+        urllib.urlretrieve(url, parser.targets[0]);
+        print "WARNING: the file found \'" + parser.targets[0] + "\' does not match \'" + localFile + "\'"
+        print "Ensure the downloaded version is suitable."
+
+else:
+    print "No matches found!"
+
+obj.close()
