In almost all the large modern Linux distributions and in the last releases of Ubuntu-based distributions the touchpad was configured out of the box to have right, left and middle clicks and you could configure them easily. The middle click is usually done with a two or three-finger tap.
In Ubuntu 12.04 I haven't seen where to enable the middle click and it is not enabled by default.
/etc/X11/xorg.conf. Some instructions for Synaptics trackpads: askubuntu.com/a/126539/43660