5 AC_DEFUN(AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL,
6 [AC_REQUIRE([AM_SYS_POSIX_TERMIOS])
7 AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
8 am_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
9 [am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
11 gwinsz_in_termios_h=no
12 if test $am_cv_sys_posix_termios = yes; then
14 [#include <sys/types.h>
19 ], gwinsz_in_termios_h=yes)
22 if test $gwinsz_in_termios_h = no; then
24 [#include <sys/types.h>
25 # include <sys/ioctl.h>
29 ], am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
32 if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
33 AC_DEFINE(GWINSZ_IN_SYS_IOCTL)