summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-30 23:46:52 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-30 23:46:52 -0500
commit950fe8f2b1249369ab0b419b0063e6683bc8080e (patch)
treed1252a031054f8c8e7b2789966b625426be4f69a /configure.ac
parent4b9641002a7b0edac8d88762385315939d2ff753 (diff)
downloaddimension-950fe8f2b1249369ab0b419b0063e6683bc8080e.tar.xz
Check for platform support for ioctl(TIOCGWINSZ).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 81c299c..336c996 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,6 +125,24 @@ AC_COMPILE_IFELSE([
AC_MSG_RESULT([no])]
)
+AC_MSG_CHECKING([for ioctl(TIOCGWINSZ)])
+AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [
+ #include <sys/ioctl.h>
+ #include <unistd.h>
+ ],
+ [
+ struct winsize ws;
+ ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
+ ]
+ )],
+ [AC_DEFINE([DMNSN_TIOCGWINSZ], [1])
+ AC_MSG_RESULT([yes])],
+ [AC_DEFINE([DMNSN_TIOCGWINSZ], [0])
+ AC_MSG_RESULT([no])]
+)
+
AC_CHECK_HEADER([GL/glx.h], [enable_glx=yes], [enable_glx=no])
AM_CONDITIONAL([GLX], [test "$enable_glx" != "no"])