This instruction is written on Ubuntu 14.10 x86_64.
Get the required tools for building:
sudo apt-get install automake libtool build-essential make texinfo
Get files from git
git clone https://github.com/N0NB/hamlib.git
chmod +x autogen.sh
This instruction is for hamlib-184.108.40.206. The readme and Install file specify to use ./configure, but in the latest official github that file is renamed to ./autogen.sh. If you instead use autogen.sh it will work just fine then.
This will take time for a cup of tea.
Then you can install (and uninstall) witht his command:
sudo make install
If you encounter this error:
libhamlib.so.2: cannot open shared object file: No such file or directory
This is what fixed it:
sudo apt-get install --reinstall libhamlib2