*** empty log message ***
[coreutils.git] / m4 / jm-winsz2.m4
bloba7d929d04b0810fe1d1035352dfc00d83f133dd1
1 #serial 4
3 AC_DEFUN([jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
4 [AC_REQUIRE([jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H])
5  AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
6                 jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
7   [jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9   if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no; then
10     AC_EGREP_CPP([yes],
11     [#include <sys/types.h>
12 #     include <sys/ioctl.h>
13 #     ifdef TIOCGWINSZ
14         yes
15 #     endif
16     ], jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
17   fi
18   ])
19   if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
20     AC_DEFINE(GWINSZ_IN_SYS_IOCTL, 1,
21       [Define if your system defines TIOCGWINSZ in sys/ioctl.h.])
22   fi