zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Termcap saga again
Date: Tue, 08 May 2001 17:23:52 +0100	[thread overview]
Message-ID: <Tc0a88d015365d947bd@mailsweeper01.cambridgesiliconradio.com> (raw)
In-Reply-To: Your message of "Tue, 08 May 2001 15:14:43 -0000." <1010508151443.ZM29889@candle.brasslantern.com>

> On May 8,  3:56pm, Peter Stephenson wrote:
> } Subject: Re: Termcap saga again
> }
> } Is there some other way of doing the test that will simply see if it
> } compiled?  I should know but I can't remember.
> 
> Yeah, change it from AC_TRY_COMPILE to AC_TRY_LINK, though it's pretty
> stupid that AC_TRY_COMPILE fails on harmless warnings.
> 
> So apply my patch (which is necessary to get AC_TRY_LINK to work right)
> and also change the _COMPILE to _LINK (which I should have noticed in the
> first place) and try again.  If it works, either you can commit it, or
> let me know and I will.

Actually, AC_TRY_COMPILE is OK, it was only AC_CHECK_HEADERS that barfed on
the warnings.  This means rewriting bits of the AC_CHECK_HEADERS internals
to get the right definitions.  Here's the combined diff.  Or do the
COMPILEs here still need to be LINKs?

I left term.h with AC_CHECK_HEADERS, because otherwise it fails if curses.h
is needed to make it work, which is tested later.

This gets worse and worse.  I can't believe how long I've wasted on this,
and lots of other people have wasted a good bit longer.

Index: acconfig.h
===================================================================
RCS file: /cvsroot/zsh/zsh/acconfig.h,v
retrieving revision 1.9
diff -u -r1.9 acconfig.h
--- acconfig.h	2001/04/26 15:48:14	1.9
+++ acconfig.h	2001/05/08 16:22:20
@@ -318,5 +318,8 @@
 /* Define if you have the terminfo strnames symbol.  */
 #undef HAVE_STRNAMES
 
+/* Define if we have curses.h */
+#undef HAVE_CURSES_H
+
 /* Define if term.h chokes without curses.h */
 #undef TERM_H_NEEDS_CURSES_H
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.53
diff -u -r1.53 configure.in
--- configure.in	2001/05/02 16:48:32	1.53
+++ configure.in	2001/05/08 16:22:32
@@ -562,15 +562,20 @@
 AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
 case "$LIBS" in
 *curses*)
-AC_CHECK_HEADERS(curses.h term.h)
+AC_CACHE_CHECK(for curses.h, ac_cv_header_curses_h,
+AC_TRY_COMPILE([#include <curses.h>], [],
+[ac_cv_header_curses_h=yes
+AC_DEFINE(HAVE_CURSES_H)],
+ac_cv_header_curses_h=no))
+AC_CHECK_HEADERS(term.h)
 if test x$ac_cv_header_term_h = xyes; then
 
 AC_MSG_CHECKING(if term.h needs curses.h)
-AC_TRY_COMPILE([#include <term.h>], [char **test = boolcodes;], boolcodes_with_only_term_h=yes,
-boolcodes_with_only_term_h=no)
+AC_TRY_COMPILE([#include <term.h>], [char **test = boolcodes; printf(*test);],
+boolcodes_with_only_term_h=yes, boolcodes_with_only_term_h=no)
 AC_TRY_COMPILE([#include <curses.h>
-#include <term.h>], [char **test = boolcodes;], boolcodes_with_curses_h_and_term_h=yes,
-boolcodes_with_curses_h_and_term_h=no)
+#include <term.h>], [char **test = boolcodes; printf(*test);],
+boolcodes_with_curses_h_and_term_h=yes, boolcodes_with_curses_h_and_term_h=no)
 if test "x$boolcodes_with_curses_h_and_term_h" = xyes && test "x$boolcodes_with_only_term_h" = xno;
 then
 AC_DEFINE(TERM_H_NEEDS_CURSES_H)

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


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


  reply	other threads:[~2001-05-08 16:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-08  9:36 Peter Stephenson
2001-05-08 13:34 ` Clint Adams
2001-05-08 14:35 ` Bart Schaefer
2001-05-08 14:56   ` Peter Stephenson
2001-05-08 15:14     ` Bart Schaefer
2001-05-08 16:23       ` Peter Stephenson [this message]
2001-05-08 18:01         ` Andrej Borsenkow
2001-05-08 18:07         ` Bart Schaefer
2001-05-08 18:25           ` Peter Stephenson
2001-05-09  5:03             ` Bart Schaefer
2001-05-09  5:19               ` Andrej Borsenkow
2001-05-09  5:32               ` PATCH: " Andrej Borsenkow
2001-05-09  5:42                 ` Bart Schaefer
2001-05-09  5:37               ` PATCH (the last?) " Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Tc0a88d015365d947bd@mailsweeper01.cambridgesiliconradio.com \
    --to=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).