Installing programs with the shell in OS X
Luckily on OS X most programs come with a nice installer program that allows you to click enter 3 or 4 times and magically the program is installed. Once and a while you may need to install and configure the script thru OS X’s Unix Shell via the Terminal. When ever I have to do this a small chill goes down my back. Most of the time it ends up being fairly straight forward but I am always away of the dangers of using the terminal. One wrong command can do a whole lot of damage. Typical steps for installing with the terminal are:

1 - Open a Terminal window (Applications -> Utilities - > Terminal)
Navigate to the folder of the script you are trying to install.
2 - Now Type:
Makefile.pl
or (depending on the script)
./configure
Hit Enter. The script will run through a lot of code and some time stop to ask you questions. To answer questions with the default answer just hit enter. For some files you might need to add parameters to the configure command like:
./configure –with-libpng=/sw \ –with-gd
Read the installation notes for more information.
3 - Next Type:
make
Hit enter.
4 - Type:
make test
5 - And Lastly type:
sudo make install
Hit enter, and enter you password.