about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac13
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a2d0dcb3..3ba4a9458 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-02-17  Peter Stephenson  <pws@csr.com>
 
+	* 19428: configure.ac: fix test for #include'ing STREAMS
+	headers.
+
 	* 19427: Src/jobs.c: last job in table wasn't reported with `jobs'.
 
 2004-02-16  Oliver Kiddle  <opk@zsh.org>
diff --git a/configure.ac b/configure.ac
index 71d2fcb99..76fdab2a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -562,8 +562,17 @@ if test $zsh_cv_header_termios_h_tiocgwinsz = no; then
 fi
  
 AH_TEMPLATE([WINSIZE_IN_PTEM],
-[Define if your system defines `struct winsize' in sys/ptem.h.])
-AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM))
+[Define if your should include sys/stream.h and sys/ptem.h.])
+AC_CACHE_CHECK(for streams headers including struct winsize,
+ac_cv_winsize_in_ptem,
+[AC_TRY_COMPILE([#include <sys/stream.h>
+#include <sys/ptem.h>],
+[struct winsize wsz],
+ac_cv_winsize_in_ptem=yes,
+ac_cv_winsize_in_ptem=no)])
+if test $ac_cv_winsize_in_ptem = yes; then
+  AC_DEFINE(WINSIZE_IN_PTEM)
+fi
 
 dnl -------------------
 dnl CHECK FOR LIBRARIES