homebrew-core/Formula/fftw.rb

42 lines
1.1 KiB
Ruby
Raw Normal View History

require 'formula'
2011-03-10 05:11:03 +00:00
class Fftw < Formula
homepage 'http://www.fftw.org'
url 'http://www.fftw.org/fftw-3.3.2.tar.gz'
sha1 '11a8c31186ff5a7d686a79a3f21b2530888e0dc2'
def install
args = ["--enable-shared",
"--disable-debug",
"--prefix=#{prefix}",
"--enable-threads",
"--disable-dependency-tracking"]
# check for gfortran
2012-03-03 23:50:27 +00:00
args << "--disable-fortran" unless which 'gfortran'
# single precision
# enable-sse only works with single
system "./configure", "--enable-single",
"--enable-sse",
*args
system "make install"
# clean up so we can compile the double precision variant
system "make clean"
# double precision
# enable-sse2 only works with double precision (default)
2010-08-08 17:20:15 +00:00
system "./configure", "--enable-sse2", *args
system "make install"
# clean up so we can compile the long-double precision variant
system "make clean"
# long-double precision
# no SIMD optimization available
2010-08-08 17:20:15 +00:00
system "./configure", "--enable-long-double", *args
system "make install"
end
end