Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: fix configure warning.
- X-seq: zsh-workers 19428
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: PATCH: fix configure warning.
- Date: Tue, 17 Feb 2004 11:37:39 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxx> 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
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author