*** empty log message ***
[coreutils.git] / m4 / jm-winsz2.m4
blob20ceb0d10c20a6de4d3116e9e76679c1846b5dbe
1 #serial 5
3 AC_DEFUN([gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
4 [AC_REQUIRE([gl_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