Introduction to fftw
        
        
          FFTW is a C subroutine library for computing the discrete Fourier
          transform (DFT) in one or more dimensions, of arbitrary input size,
          and of both real and complex data (as well as of even/odd data,
          i.e. the discrete cosine/sine transforms or DCT/DST).
        
        
          This package is known to build and work properly using an LFS-11.0
          platform.
        
        
          Package Information
        
        
        
          User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/fftw
        
       
      
        
          Installation of fftw
        
        
          ![[Note]](../images/note.png) 
          
            Note
          
          
            We build fftw three times for different libraries in different
            numerical precisions: the default double precision floating
            point, the older 32-bit (single precision) version named float
            which sacrifices precision for speed, and the long double which
            offers increased precision at the cost of slower execution.
          
         
        
          The first build is for double precision arithmetic. Install
          fftw by running the following
          commands:
        
        ./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --enable-threads \
            --enable-sse2    \
            --enable-avx     &&
make
        
          To test the results, issue: make
          check. On 32-bit systems, the tests can take
          substantially longer than they would on 64-bit machines.
        
        
          Now, as the root user:
        
        make install
        
          Now build single precision:
        
        make clean &&
./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --enable-threads \
            --enable-sse2    \
            --enable-avx     \
            --enable-float   &&
make
        
          As the root user:
        
        make install
        
          Finally, build long double precision:
        
        make clean &&
./configure --prefix=/usr    \
            --enable-shared  \
            --disable-static \
            --enable-threads \
            --enable-long-double &&
make
        
          As the root user:
        
        make install
       
      
        
          Command Explanations
        
        
          --enable-shared
          --disable-static: Use shared libs instead of static
          libs.
        
        
          --enable-threads: This
          enables libfftw3_threads.so to be
          compiled. It is used by e.g. the gimp plugin from G'MIC.
        
        
          --enable-float: This
          enables building the library that uses single precision floating
          point arithmetic. It is faster but less precise than the default
          double precision library. The library will be called libfftw3f.so needed by PulseAudio-15.0.
        
        
          --enable-long-double: This
          enables building the library that uses higher precision long-double
          floating point arithmetic. The library will be called libfftw3l.so.