Installing from Debian Repository
$ sudo aptitude install libfftw3-3 libfftw3-dev
The second package is only necessary for development.
Installing from Source
$ mkdir tmp $ cd tmp $ wget http://www.fftw.org/fftw-3.2.2.tar.gz $ tar -xvzf fftw-3.2.2.tar.gz $ cd fftw-3.2.2 $ ./configure --prefix=/usr/local/fftw-3.2.2 --enable-threads \ --enable-single F77=gfortran $ make $ sudo make install $ sudo ln -s /usr/local/fftw-3.2.2 /usr/local/fftw
This will install FFTW under /usr/local/fftw-3.2.2, symlinked by /usr/local/fftw as well.
Note that the portion in red at the configure line should be modified accordingly. I use GFortran, hence the F77 option. One of the programs that I often ends up building need both double and single precision versions of FFTW, so I run
./configure ; make ; make install once with
--enable-single and another without the
--enable-single option. This will install both versions under the same lib directory.