zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: fix configure warning.
@ 2004-02-17 11:37 Peter Stephenson
  0 siblings, 0 replies; only message in thread
From: Peter Stephenson @ 2004-02-17 11:37 UTC (permalink / raw)
  To: Zsh hackers list

This fixes a warning from configure 2.59 about trying to compile
sys/ptem.h.  The header is present but won't compile.  This causes
configure to execute AC_SOMETHING_ROTTEN_IN_THE_STATE_OF_DENMARK (or
equivalent).

The corresponding section of system.h uses the test to #include both
sys/stream.h and sys/ptem.h.  According to the name, we are looking
for struct winsize.  So a better test would seem to be to #include both
files and see if we can compile a reference to struct winsize.  This
passes without a grumble both with and without streams support.
(Actually, at least on Solaris 8, winsize isn't defined inside ptem.h,
so the old message was fallacious.)

Next stop is curses.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.4
diff -u -r1.4 configure.ac
--- configure.ac	14 Feb 2004 18:50:16 -0000	1.4
+++ configure.ac	17 Feb 2004 11:17:53 -0000
@@ -562,8 +562,17 @@
 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

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-02-17 11:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-17 11:37 PATCH: fix configure warning Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).