2017-02-04 01:49:00 -05:00
|
|
|
# frozen_string_literal: true
|
1999-08-13 01:37:52 -04:00
|
|
|
require 'mkmf'
|
|
|
|
|
2012-06-09 21:29:58 -04:00
|
|
|
$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
|
|
|
|
|
2018-07-22 06:02:54 -04:00
|
|
|
if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
|
2001-03-20 09:50:43 -05:00
|
|
|
have_header("sys/stropts.h")
|
|
|
|
have_func("setresuid")
|
2001-11-21 10:42:12 -05:00
|
|
|
have_header("libutil.h")
|
|
|
|
have_header("pty.h")
|
2016-04-29 21:09:07 -04:00
|
|
|
have_header("pwd.h")
|
2022-08-17 22:35:17 -04:00
|
|
|
if /openbsd/ =~ RUBY_PLATFORM
|
|
|
|
have_header("util.h") # OpenBSD openpty
|
|
|
|
util = have_library("util", "openpty")
|
|
|
|
end
|
2008-12-16 05:49:12 -05:00
|
|
|
if have_func("posix_openpt") or
|
2020-04-30 21:58:27 -04:00
|
|
|
(util or have_func("openpty")) or
|
2001-03-20 09:50:43 -05:00
|
|
|
have_func("_getpty") or
|
2001-11-27 05:00:35 -05:00
|
|
|
have_func("ptsname") or
|
2001-03-20 09:50:43 -05:00
|
|
|
have_func("ioctl")
|
|
|
|
create_makefile('pty')
|
|
|
|
end
|
1999-08-13 01:37:52 -04:00
|
|
|
end
|