Installing Spidermonkey

mattbasta edited this page Jul 6, 2011 · 6 revisions

Mac OS X Instructions

These instructions assume you already have brew installed. You can get it from the homebrew homepage.

Getting Autoconf 2.13

Spidermonkey requires you to use autoconf 2.13, or you won't be able to install it. It sucks, but it's not too terribly hard to install.

If you don't have MacPorts installed, run this (you'll be likely be prompted for your password at some point):

cd /tmp
wget http://distfiles.macports.org/MacPorts/MacPorts-1.9.2.tar.gz
tar -xvf MacPorts-1.9.2.tar.gz
cd MacPorts-1.9.2
./configure && make && sudo make install
export PATH=/opt/local/bin\:/opt/local/sbin\:$PATH
sudo port -v selfupdate

Now that you have MacPorts installed (and configured! go you!), simply run:

sudo port install autoconf213

Getting Tracemonkey

Make sure you have mercurial installed! How can you know for certain?

easy_install mercurial

Next, move to the folder you'll use for your Tracemonkey install. I'm using /opt for this, but you can put it anywhere (just change the commands).

cd /opt
sudo hg clone http://hg.mozilla.org/tracemonkey/
cd tracemonkey/js/src
sudo autoconf213 && sudo ./configure && sudo make
sudo ln /opt/tracemonkey/js/src/js /usr/bin/js