1require 'mkmf'
2
3$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
4
5if /mswin|mingw|bccwin|nacl/ !~ RUBY_PLATFORM
6  have_header("sys/stropts.h")
7  have_func("setresuid")
8  have_header("libutil.h")
9  have_header("util.h") # OpenBSD openpty
10  have_header("pty.h")
11  have_library("util", "openpty")
12  if have_func("posix_openpt") or
13      have_func("openpty") or
14      have_func("_getpty") or
15      have_func("ptsname") or
16      have_func("ioctl")
17    create_makefile('pty')
18  end
19end
20