FFTW is a C library for Discrete Fourier Transforms. The following instructions allow you to install the library on Mac OS X Mavericks. All commands are run from Terminal.
First of all ensure the xCode Command Line Tools are installed:
Download the fftw source and change to its directory.
Configure, make and install the library (no need to use sudo). In this example we enable both floating point and threads.
./configure --enable-float --enable-threads
(If this gives an error that the 'compiler cannot create executables' you will likely need to accept Apple's terms and conditions for xCode)