stack-trace: Use libasan as an alternative to libbacktrace.
[gnulib.git] / m4 / jm-winsz2.m4
blobed5177cf5337ab38bf9fdcb9579de1ac5800f39e
1 # jm-winsz2.m4
2 # serial 8
3 dnl Copyright (C) 1996, 1999, 2001, 2004, 2009-2024 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
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
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