ext/numo/linalg/mkmf_linalg.rb in numo-linalg-0.1.2 vs ext/numo/linalg/mkmf_linalg.rb in numo-linalg-0.1.3
- old
+ new
@@ -15,28 +15,10 @@
message "creating lib/site_conf.rb\n"
FileUtils.mkdir_p "lib"
ext = detect_library_extension
- need_version = false
- if ext == 'so'
- begin
- Fiddle.dlopen "libm.so"
- rescue
- (5..7).each do |i|
- begin
- Fiddle.dlopen "libm.so.#{i}"
- need_version = true
- break
- rescue
- end
- end
- if !need_version
- raise "failed to check whether dynamically linked shared object needs version suffix"
- end
- end
- end
open("lib/site_conf.rb","w"){|f| f.write "
module Numo
module Linalg
@@ -47,11 +29,10 @@
BLAS_LIBPATH = #{ldirs[3].inspect}
LAPACK_LIBPATH = #{ldirs[4].inspect}
module Loader
EXT = '#{ext}'
- NEED_VERSION_SUFFIX = #{need_version}
end
end
end"
}
@@ -65,9 +46,11 @@
'dylib'
else
'so'
end
end
+
+require 'numo/narray'
def find_narray_h
$LOAD_PATH.each do |x|
if File.exist? File.join(x,'numo/numo/narray.h')
$INCFLAGS = "-I#{x}/numo " + $INCFLAGS