# Mozilla SpiderMonkey 1.7.0
# ==========================
# This is the standalone JavaScript engine. Use this when you only need
# to build libjs into an app (like gxine or gpac), but don't need the whole mozilla
# installation.
cd
test -f installed/js-1.7.0.tar.gz && mv installed/js-1.7.0.tar.gz .
test ! -f js-1.7.0.tar.gz &&
wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "js-*" -exec rm -r {} \;
tar xzvf ~/js-1.7.0.tar.gz
mv -f js js-1.7.0
cd js-1.7.0
test $UID = 0 && chown -R root:root .
cd src
make -f Makefile.ref BUILD_OPT=1