many *.m4 files: improve m4 quoting
[gnulib.git] / m4 / jm-winsz2.m4
1 # serial 7
2
3 # Copyright (C) 1996, 1999, 2001, 2004, 2009 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 AC_DEFUN([gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL],
9 [AC_REQUIRE([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H])
10  AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h],
11                 gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h,
12   [gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
13
14   if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no; then
15     AC_EGREP_CPP([yes],
16     [#include <sys/types.h>
17 #     include <sys/ioctl.h>
18 #     ifdef TIOCGWINSZ
19         yes
20 #     endif
21     ], gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes)
22   fi
23   ])
24   if test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
25     AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1],
26       [Define if your system defines TIOCGWINSZ in sys/ioctl.h.])
27   fi
28 ])