On a fresh install of Leopard, the following is what I did in order to set up Erlang working on my Mackbook Pro:
1. Download Xcode by going to Apple ADC. Xcode is the Apple’s developer tool set, and its available for free. At the time of my install, the latest is Xcode 3.0 and its little over 1 GB. Double-click the downloaded file (named xcode_3.0.dmg), and follow the graphic package installer. This will install Xcode under /Developer by default. This step is required for Erlang because it will install GCC compiler required to build Erlang from source.
2. Get the latest Erlang source, which will be a file named otp_src_R12B-2.tar. Unarchive the file and follow the instructions:
$ cd otp_src_R12B-2
$. /configure
$ make
$ sudo make install
Now bring up a terminal and issue the command:
$ erl
Erlang (BEAM) emulator version 5.6.2 [smp:2] [async-threads:0] [kernel-poll:false]
Eshell V5.6.2 (abort with ^G)
1>2+3.
5
2>;
I am all set to go…