Next: , Previous: Installation and Customization, Up: Installation and Customization


10.1 Installation on Unix

FFTW comes with a configure program in the GNU style. Installation can be as simple as:

     ./configure
     make
     make install

This will build the uniprocessor complex and real transform libraries along with the test programs. (We recommend that you use GNU make if it is available; on some systems it is called gmake.) The “make install” command installs the fftw and rfftw libraries in standard places, and typically requires root privileges (unless you specify a different install directory with the --prefix flag to configure). You can also type “make check” to put the FFTW test programs through their paces. If you have problems during configuration or compilation, you may want to run “make distclean” before trying again; this ensures that you don't have any stale files left over from previous compilation attempts.

The configure script chooses the gcc compiler by default, if it is available; you can select some other compiler with:

     ./configure CC="<the name of your C compiler>"

The configure script knows good CFLAGS (C compiler flags) for a few systems. If your system is not known, the configure script will print out a warning. In this case, you should re-configure FFTW with the command

     ./configure CFLAGS="<write your CFLAGS here>"

and then compile as usual. If you do find an optimal set of CFLAGS for your system, please let us know what they are (along with the output of config.guess) so that we can include them in future releases.

configure supports all the standard flags defined by the GNU Coding Standards; see the INSTALL file in FFTW or the GNU web page. Note especially --help to list all flags and --enable-shared to create shared, rather than static, libraries. configure also accepts a few FFTW-specific flags, particularly:

To force configure to use a particular C compiler foo (instead of the default, usually gcc), pass CC=foo to the configure script; you may also need to set the flags via the variable CFLAGS as described above.