File: extconf.rb

package info (click to toggle)
libserialport-ruby 0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 88 kB
  • ctags: 97
  • sloc: ansic: 1,091; ruby: 30; makefile: 7
file content (13 lines) | stat: -rw-r--r-- 278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'mkmf'

printf("checking for OS... ")
STDOUT.flush
os = /-([a-z]+)/.match(RUBY_PLATFORM)[1]
puts(os)
$CFLAGS += " -D#{os}"

if !(os == 'mswin' or os == 'bccwin')
  exit(1) if not have_header("termios.h") or not have_header("unistd.h")
end

create_makefile("serialport")