sudo apt-get install swig on Ubuntu 14.04
download the latest development (master) version of SWIG:
git clone https://github.com/swig/swig.git
cd swig
sudo apt-get install automake
./autogen.sh
./configure
sudo apt-get install bison flex
make
sudo make install
Hope it helps, Gepp