#!/bin/bash

#Some cleanup
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' 'libtool'

#Untar 
tar -zxvf  libtool[\w.-]*.tar.gz
rm libtool[\w.-]*.tar.gz


#Move libtool into src directory
mv libtool[\w.-]* src

#Compile libtool
cd src 
./configure --prefix="$ISSM_DIR/externalpackages/libtool/install" 
make  
make install
