summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 29 insertions, 0 deletions
diff --git a/configure b/configure
index 36992329..fa72e0e0 100755
--- a/configure
+++ b/configure
@@ -124,6 +124,8 @@ have_git=
have_pwuid=
have_alloca=
have_termios=
+have_winsize=
+termios_define=
conf_dir=config
config_h=$conf_dir/config.h
config_make=$conf_dir/config.make
@@ -651,6 +653,7 @@ have_glob := $have_glob
have_posix_sigs := $have_posix_sigs
have_termios := $have_termios
+termios_define := $termios_define
# do we compile in debug support?
debug_support := $debug_support
@@ -2153,6 +2156,32 @@ else
printf "no\n"
fi
+printf "Checking for struct winsize ... "
+
+for termios_define in NOTHING __EXTENSIONS__ ; do
+ cat > conftest.c <<!
+#define $termios_define
+#include <sys/ioctl.h>
+#include <termios.h>
+
+int main(int argc, char **argv)
+{
+ struct winsize ws;
+ return 0;
+}
+!
+ if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_WINSIZE 1\n" >> $config_h
+ have_winsize=y
+ break;
+ fi
+done
+
+if [ -z "$have_winsize" ] ; then
+ printf "no\n"
+fi
+
#
# Dependent variables
#