abinfo "Setting environment variables ..."
export CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math"

CONFIGURE="./configure \
    --prefix=/opt/32 \
    --enable-shared \
    --enable-threads \
    --enable-openmp"

pushd fftw-${PKGVER}-double
abinfo "Building double variant ..."
$CONFIGURE --enable-sse2 --enable-avx
make
make install DESTDIR="$PKGDIR"
popd

pushd fftw-${PKGVER}-long-double
abinfo "Building long double variant ..."
$CONFIGURE --enable-long-double
make
make install DESTDIR="$PKGDIR"
popd

pushd fftw-${PKGVER}-single
abinfo "Building single variant ..."
$CONFIGURE --enable-float --enable-sse --enable-avx
make
make install DESTDIR="$PKGDIR"
popd
