Install packages from source

Introduction
Many of you have heard about installing packages from source, but have never did that because it's somewhat difficult. First, why would you want to install a package from source when you can easily install it using Synaptic Package Manager? There could be many answers to this question, primarily being you want to install the latest version of a software not yet available through Synaptic. Or you want to install a software not available through Synaptic at all.

Howto
We'll take the example of installing Wine.

./configure make make install
 * First, make sure the package you are going to install from source is not already installed through Synaptic Package Manager. If it is, open Synaptic and uninstall/remove it.
 * Using Synaptic, install the package gcc, libgcc.
 * Download the latest version of the package you are going to install, wine-1.1.5 in our case. The downloaded file will be in the form of .tar.gz in most cases.
 * Extract the contents of the downloaded source file in a desired location, say the Desktop.
 * Open the folder where the contents were extracted. You'll see several files and directories, including the file "configure", "Makefile.in", "README", etc.
 * Press the F4 key to bring up command-line (Konsole). (Non-KDE users would have to manually cd to the folder containing extracted contents using command-line/terminal)
 * Issue the command:
 * A process will initiate that will check if all the required dependencies for the package to be installed are already installed. If any dependency is not installed, it would be reported by in command-line itself and the installation would not proceed unless you install the dependencies first.
 * Use Synaptic to install any missing dependencies.
 * After all the dependencies have been installed, running "./configure" again will result in the successful generation of make file.
 * Next, issue the command:
 * If all goes well, the make command will successfully compile the package to be installed, in the present directory itself, without errors
 * Finally, issue the following command to install the compiled stuff in the appropriate directories:

The above procedure works for most source packages, but may not work with some.