mkvtoolnix/ac/tiocgwinsz.m4
Moritz Bunkus 50b994599b Automatically break help output at the actual terminal width.
Works only with programs using the cli_parser_c class. This is only
mkvpropedit so far, but the others will follow.

Oh, and this only works if ioctl & TIOCGWINSZ are available.
2009-12-07 21:09:14 +01:00

15 lines
400 B
Plaintext

AC_CACHE_CHECK([for ioctl & TIOCGWINSZ], [ac_cv_tiocgwinsz],[
ac_cv_tiocgwinsz="no"
AC_LANG_PUSH(C++)
AC_TRY_COMPILE([
#include <sys/ioctl.h>
],[
struct winsize ws;
ioctl(0, TIOCGWINSZ, &ws);
],[ac_cv_tiocgwinsz="yes"])
AC_LANG_POP
])
if test x"$ac_cv_posix_fadvise" = "xyes" ; then
AC_DEFINE([HAVE_TIOCGWINSZ], 1, [define if ioctl & TIOCGWINSZ are available])
fi