aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-07-31 06:55:44 +1000
committerGravatar axel <axel@liljencrantz.se>2006-07-31 06:55:44 +1000
commite79fdcb194f81eaf40d6f973d413bc45c38c65ce (patch)
treea2f43d86a0e24d2bc4ceadb4cce223f420c28228 /configure.ac
parent60f05338216ecd819fe9889124b4d40049d830cb (diff)
Provide fallback is struct winsize is not defined
darcs-hash:20060730205544-ac50b-26f34eb04b56924baa34f560fd274cf38413b5f5.gz
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e4ce5d35..4c2adcc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,6 +286,22 @@ else
AC_MSG_RESULT(no)
fi
+
+# Check if struct winsize exists
+AC_MSG_CHECKING([if struct winsize exists])
+AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([
+#include <sys/types.h>
+#include <signal.h>
+#include <sys/ioctl.h>
+
+#ifdef HAVE_SIGINFO_H
+#include <siginfo.h>
+#endif],
+ [struct winsize termsize; ioctl(1,TIOCGWINSZ,&termsize);])],
+ [AC_MSG_RESULT(yes); AC_DEFINE([HAVE_WINSIZE], [1], [Define to 1 if the winsize struct exists])],
+ AC_MSG_RESULT(no))
+
# If we have a fwprintf in libc, test that it actually works. As of
# March 2006, it is broken under Dragonfly BSD.
if test "$ac_cv_func_fwprintf" = yes; then