ext/numo/libsvm/extconf.rb in numo-libsvm-0.5.0 vs ext/numo/libsvm/extconf.rb in numo-libsvm-1.0.0
- old
+ new
@@ -24,20 +24,16 @@
puts 'libnarray.a not found.'
exit(1)
end
end
-if RUBY_PLATFORM =~ /linux/
- $INCFLAGS = "-I/usr/include/libsvm #{$INCFLAGS}"
-end
+$LDFLAGS << ' -lstdc++ '
-unless have_header('svm.h')
- puts 'svm.h not found.'
- exit(1)
-end
-
-unless have_library('svm')
- puts 'libsvm not found.'
- exit(1)
+$srcs = Dir.glob("#{$srcdir}/*.c").map { |path| File.basename(path) }
+$srcs << 'svm.cpp'
+Dir.glob("#{$srcdir}/*/") do |path|
+ dir = File.basename(path)
+ $INCFLAGS << " -I$(srcdir)/#{dir}"
+ $VPATH << "$(srcdir)/#{dir}"
end
create_makefile('numo/libsvm/libsvmext')