ext/rs_232/extconf.rb in rs_232-2.0.7 vs ext/rs_232/extconf.rb in rs_232-2.2.0

- old
+ new

@@ -5,33 +5,29 @@ $CFLAGS << ' -DDEBUG' $CFLAGS << ' -g -O' $stdout.puts "compiling in debug mode... flags: #{$CFLAGS}" end -def root(path) - File.expand_path("../#{path}/", __FILE__) -end - dir_config('rs_232') $warnflags = '-Wall' OS = case RbConfig::CONFIG['host_os'].downcase - when /linux/ - 'linux' - when /darwin/ - 'darwin' - when /freebsd/ - 'freebsd' - when /openbsd/ - 'openbsd' - when /sunos|solaris/ - 'solaris' - when /mswin|mingw/ - 'windows' - else - RbConfig::CONFIG['host_os'].downcase + when /linux/ + 'linux' + when /darwin/ + 'darwin' + when /freebsd/ + 'freebsd' + when /openbsd/ + 'openbsd' + when /sunos|solaris/ + 'solaris' + when /mswin|mingw/ + 'windows' + else + RbConfig::CONFIG['host_os'].downcase end have_header('ruby.h') have_header('stdio.h') @@ -51,10 +47,10 @@ have_header('string.h') have_header('fcntl.h') have_header('errno.h') have_header('sys/ioctl.h') else - raise "RS-233 implementation is not tested for this #{OS} platform." + fail "RS-233 implementation is not tested for this #{OS} platform." end $objs = %w(constants.o port.o initializer.o) $CFLAGS += " -DOS_#{OS.upcase}"