If you find yourself having to (or wanting to) compile a piece of software, don't panic. The process is fairly simple. Every piece of software is different, but here is a summary of the most common scenario for Unix-based OS such as Linux or Mac OSX. These instructions are not so useful for Windows, as apps are usually built with special GUI development tools, not command line tools.
First, you'll need a command line and a compiler.
1.DOWNLOADING YOUR COMLILER:
Linux You almost certainly already have a command line, and a compiler called gcc. Try typing gcc on the command line. If it tells you command not found, install gcc using your package manager.
Mac OS X Your command line is Terminal, which is located in Applications/Utilities. You'll need to download XCode, which contains Apple's compiler, from the Apple developer tools web site. XCode is often bundled on the operating system CD or DVD that comes with your computer.
Windows Microsoft provides a compiler with its free downloadable GUI development environment Visual Studio Express, but Cygwin is both more useful and more Unix-compatible. Download and install it, making sure to include all the packages from the "Devel" section when you choose packages.
2.Obtaining the code:
Downloading Practically all source packages come in a zipped-up archive file. This will have the suffix .tgz or .tar.gz. (on Windows .zip) It will also have a name and a version number, something like example-3.2.8.tar.gz. You should make yourself a directory to work in, called "source" or "build" or something along those lines. Using a browser, download the source file into that directory.
Unpacking From your command line, go into your working directory (using the cd command): "cd source"
The quickest way to unzip the archive is tar: "tar -xzvf example-3.2.8.tar.gz"
( on Windows, right-click on the .zip file and select Extract All... )
This will unzip all the files of the source code into a new subdirectory with the same name as your application, including the version numner. Go into this directory by typing: "cd example-3.2.8"
3.Reading the documentation:
Reading the Documentation Practically every source package contains some reading material, typically files with names in all caps, like README and INSTALL. Read these! They tell you how to proceed. There may also be documentation for your specific situation, like README.macosx. You can use the less command on the command line to read them:
"less install"
or just open them in your favorite text editor. The documentation may point you to other software that you need to install before you can install this package ("dependencies"), or to quirks of the installation process that you need to be alert for. Much of this may be covered on the software's web page as well.
BUILDING:
Building The process may differ (especially on Windows), but the most common procedure is as follows. Type: ./configure
For a full list of all the options you can give to the configure tool, "run:./configure --help"
The configuration process may take several minutes. When it's done, if it doesn't give you an error message, you're ready to compile. If it does give you an error message, refer to the Troubleshooting section below. To compile the software, just type: "make"
This performs the meat of the operation. If all goes well, it should take a while, and may monopolize your computer's processor while it's running. Don't worry, compiling software is intensive work. When it ends, if you don't see an error message, you're ready for the last step. Note that you probably won't see a congratulations message either.
The software has been compiled. All that remains to do is to put it where it belongs.
"make install" will place the various files that have been built in their proper locations in the filesystem. Now they're ready to be used. Often, you will need to run make install with root level permissions so files can copied to correct location.
"sudo make install" Most systems have the sudo command, which will allow you run commands as the super-user. Note that, When running commands with sudo you will be prompted for a password.
TROUBLESHOOTING
Troubleshooting If any of the steps above don't go smoothly, there are a few systematic steps to take that will help figure out what the problem is. Make sure you've followed all the instructions rigorously, and that you have any necessary dependencies installed.
I hope this helps some of you better understand the process, and I hope you all participate!



