ruby/ext/pty/extconf.rb
yugui b67d1000ae merges r20846 from trunk into ruby_1_9_1 and filsters modification for
1.9.2 features.
* ext/pty/extconf.rb: check util.h for OpenBSD.

* ext/pty/pty.c: include util.h if available.  fix variable name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19 11:37:16 +00:00

16 lines
390 B
Ruby

require 'mkmf'
if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
have_header("sys/stropts.h")
have_func("setresuid")
have_header("libutil.h")
have_header("util.h") # OpenBSD openpty
have_header("pty.h")
have_library("util", "openpty")
if have_func("openpty") or
have_func("_getpty") or
have_func("ptsname") or
have_func("ioctl")
create_makefile('pty')
end
end