Info Node: (fftw.info)Installing FFTW in both single and double precision
(fftw.info)Installing FFTW in both single and double precision
Installing FFTW in both single and double precision
===================================================
It is often useful to install both single- and double-precision
versions of the FFTW libraries on the same machine, and we provide a
convenient mechanism for achieving this on Unix systems.
When the `--enable-type-prefix' option of configure is used, the
FFTW libraries and header files are installed with a prefix of `d' or
`s', depending upon whether you compiled in double or single precision.
Then, instead of linking your program with `-lrfftw -lfftw', for
example, you would link with `-ldrfftw -ldfftw' to use the
double-precision version or with `-lsrfftw -lsfftw' to use the
single-precision version. Also, you would `#include' `<drfftw.h>' or
`<srfftw.h>' instead of `<rfftw.h>', and so on.
*The names of FFTW functions, data types, and constants remain
unchanged!* You still call, for instance, `fftw_one' and not
`dfftw_one'. Only the names of header files and libraries are
modified. One consequence of this is that *you cannot use both the
single- and double-precision FFTW libraries in the same program,
simultaneously,* as the function names would conflict.
So, to install both the single- and double-precision libraries on the
same machine, you would do:
./configure --enable-type-prefix [ other options ]
make
make install
make clean
./configure --enable-float --enable-type-prefix [ other options ]
make
make install