Now that MacOS X is released, its new Unix underpinnings allow FFTW to compile and install using our automatic configuration script For earlier versions of the OS, you will have to do a little more work (but not too much), as described below.
To install FFTW on MacOS X, all you should have the Apple developer
tools installed, so that you can open up a terminal window and compile
FFTW just as you would on any other Unix system:
./configure && make to compile, and
sudo make install to switch to
/usr/local. (Note that
for your password, not
you can just use
su, assuming that your
account is enabled (it isn't by default).)
The multi-threaded version (with POSIX threads) also works fine
Instead of the above, the Fink project has put together precompiled/prepackaged versions of FFTW 2.x and FFTW 3.x for MacOS X.
Fink provides a collection of free-software Unix tools packaged for MacOS X, based on the excellent package and system-maintainance tools developed for Debian GNU/Linux
Greg Allen has graciously posted a Mac package of FFTW 2.1.3 and BenchFFT, for CodeWarrior 5 I believe.
In the past, I've created precompiled packages of FFTW for Metrowerks CodeWarrior, including PPC and 68k libraries. Since my version of CodeWarrior (Pro 2) is becoming more and more out of date, I haven't been doing this. The last version I packaged in this way was FFTW 2.0.1: fftw-2.0.1.sit.bin.
If you are interested in creating precompiled CodeWarrior packages of FFTW 3.x (e.g. for MacOS 9), please let us know.
Compiling FFTW yourself on the MacOS is fairly straightforward. For example, this is the outline of the steps to compile the complex-transform library using CodeWarrior.
.tar.gzformat); Stuffit Expander (available gratis) should have no problem with this. (Alternatively, you can download standalone gunzip and untar programs.)
fftwsubfolder of the FFTW package onto the project (this will add all the
fftwfolder into the "System Paths" section (since our code includes it as
To compile the corresponding test program (
you'll create a "console ANSI C" project, adding the library created
above and the files
test_main.c (in the
tests subfolder); you'll
also need to modify the access paths as above.
Compiling the rfftw transforms is similar, except that you use the
rfftw folder, and
rfftw_test.c for the test
CodeWarrior Pro 4 reportedly generates incorrect code when compiling FFTW 2.x at the highest optimization level (level 4). Supposedly, this problem is fixed in CodeWarrior Pro 5 with all the latest updates applied. (Thanks to Dan Melomedman for the report, and for bugging Metrowerks about this.) We haven't heard of problems with other versions of CodeWarrior.
Daniel Barth sent us a couple of notes regarding the compilation of FFTW 2.x using Absoft's C/C++ and Fortran compilers, version 6.2 (circa 2001).
First, the Absoft C compiler seems to have trouble with the Unix line endings (line feeds) in the source files. The source files can be converted to use Mac line endings (carriage returns) via a program like NetStripper.
Second, in order to link with Fortran programs using Absoft's ProFortran, add a
#define FFTW_FORTRANIZE_UPPERCASE 1 statement to the