X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fjm-winsz2.m4;h=3d06c3111686bd283435aa9089bfe0bc5e5cd2c3;hb=db2ebe9d04c394f51b2b0f4306c9f9a79959b1da;hp=642e1ff1459c73076791367ebe399fe174c578a0;hpb=409d8f2d902cc6e12e40b08200f5dac27d0e98cb;p=gnulib.git diff --git a/m4/jm-winsz2.m4 b/m4/jm-winsz2.m4 index 642e1ff14..3d06c3111 100644 --- a/m4/jm-winsz2.m4 +++ b/m4/jm-winsz2.m4 @@ -1,22 +1,29 @@ -#serial 2 +# serial 7 -AC_DEFUN(jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL, -[AC_REQUIRE([jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H]) +# Copyright (C) 1996, 1999, 2001, 2004, 2009-2010 Free Software Foundation, +# Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL], +[AC_REQUIRE([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H]) AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h], - jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h, - [jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no + gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h, + [gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no - if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no; then + if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no; then AC_EGREP_CPP([yes], [#include # include # ifdef TIOCGWINSZ yes # endif - ], jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes) + ], gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes) fi ]) - if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then - AC_DEFINE(GWINSZ_IN_SYS_IOCTL) + if test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then + AC_DEFINE([GWINSZ_IN_SYS_IOCTL], [1], + [Define if your system defines TIOCGWINSZ in sys/ioctl.h.]) fi ])