# Tanım: Ayrık Fourier dönüşümü (DFT) hesaplamak için bir kütüphane.
# URL: http://www.fftw.org/
# Paketçi: milisarge
# Gerekler:
# Grup: kütüphane

isim=fftw
surum=3.3.4
devir=3
kaynak=(http://www.fftw.org/$isim-$surum.tar.gz)

derle() {
cd $SRC
  cp -a $isim-$surum $isim-$surum-double
  cp -a $isim-$surum $isim-$surum-long-double
  mv $isim-$surum $isim-$surum-single

# use upstream default CFLAGS while keeping our -march/-mtune
  CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math"

  CONFIGURE="./configure F77=gfortran --prefix=/usr \
                 --enable-shared --enable-threads \
		 --enable-openmp"

# build double precision
  cd $SRC/$isim-$surum-double
  $CONFIGURE --enable-sse2 --enable-avx
  make
  make DESTDIR=$PKG install

  # build & install long double precission
  cd $SRC/$isim-$surum-long-double
  $CONFIGURE --enable-long-double
  make
  make DESTDIR=$PKG install

  # build & install single precision
  cd $SRC/$isim-$surum-single
  $CONFIGURE --enable-float --enable-sse --enable-avx
  make
  make DESTDIR=$PKG install
  rm -rf $PKG/usr/share/info/dir
}
