File: extconf.rb

package info (click to toggle)
ruby-fftw3 0.4-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 128 kB
  • ctags: 16
  • sloc: ansic: 223; ruby: 64; makefile: 4
file content (42 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require "mkmf"

dir_config('narray',$vendorarchdir,$vendorarchdir)
dir_config('fftw3','/usr')

if ( ! ( have_header("narray.h") && have_header("narray_config.h") ) ) then
   print <<-EOS
   ** configure error **  
   Header narray.h or narray_config.h is not found. If you have these files in 
   /narraydir/include, try the following:

   % ruby extconf.rb --with-narray-include=/narraydir/include

EOS
   exit(-1)
end

if ( ! ( have_header("fftw3.h") && have_library("fftw3") ) ) then
   print <<EOS
   ** configure error **
   Header fftw3.h or the compiled fftw3 library is not found.
   If you have the library installed under /fftw3dir (that is, fftw3.h is
   in /fftw3dir/include and the library in /fftw3dir/lib/),
   try the following:

   % ruby extconf.rb --with-fftw3-dir=/fftw3dir

   Alternatively, you can specify the two directory separately
   with --with-fftw3-include and --with-fftw3-lib.
EOS
   exit(-1)
end

if have_library("fftw3f")
  $CFLAGS += ' -DFFTW3_HAS_SINGLE_SUPPORT'
end

if /cygwin|mingw/ =~ RUBY_PLATFORM
   have_library("narray") || raise("ERROR: narray library is not found")
end

create_makefile("numru/fftw3")