zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Peter Stephenson <pws@csr.com>,
	zsh-workers@sunsite.dk (Zsh hackers list)
Subject: PATCH (the last?) Re: Termcap saga again
Date: Wed, 9 May 2001 05:37:47 +0000	[thread overview]
Message-ID: <1010509053748.ZM4390@candle.brasslantern.com> (raw)
In-Reply-To: <1010509050330.ZM15052@candle.brasslantern.com>

On May 9,  5:03am, Bart Schaefer wrote:
}
} On May 8,  7:25pm, Peter Stephenson wrote:
} }
} } In that case I shall commit the following.
} 
} Unfortunately, that has now broken my build on RedHat 5.2 and 6.2.

Ok, this seems to have got it.  I put all of PWS's new code into the
not-found branch of a new AC_CHECK_HEADERS call that checks for ONLY
curses.h.  The empty if-found branch correctly results in an AC_DEFINE
call as needed.

I then forced the AC_CHECK_HEADERS to fail by the simple expedient of
changing the name of the file to one that doesn't exist, and thereby
verified that AC_TRY_COMPILE in the not-found branch works correctly.

By virtue of using AC_CHECK_HEADERS, autoheader discovers that we're
looking for curses.h and it's no longer necessary to have a #undef for
it in acconfig.h, which increases my confidence that everything will
work right.  I hate having to add things explicitly to acconfig.h.

Since term.h is now alone in its own call to AC_CHECK_HEADERS, I took
the opportunity to remove an explicit `if test ...' and simply move the
code that followed into the if-found branch of that macro.


Index: acconfig.h
===================================================================
--- acconfig.h	2001/05/09 04:42:10	1.5
+++ acconfig.h	2001/05/09 05:19:35
@@ -318,8 +318,5 @@
 /* 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
===================================================================
--- configure.in	2001/05/09 04:42:10	1.8
+++ configure.in	2001/05/09 05:25:35
@@ -562,15 +562,14 @@
 AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
 case "$LIBS" in
 *curses*)
-AC_CACHE_CHECK(for curses.h, ac_cv_header_curses_h,
+AC_CHECK_HEADERS(curses.h, [],
+AC_CACHE_CHECK(for Solaris 8 curses.h mistake, 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_cv_header_curses_h=no)))
+AC_CHECK_HEADERS(term.h,
+[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 <curses.h>
@@ -620,8 +619,7 @@
 #include <term.h>], [char **test = strnames; printf(*test);],
 AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
 AC_MSG_RESULT($strnames)
-
-fi;;
+]);;
 esac
 
 dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


      parent reply	other threads:[~2001-05-09  5:38 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
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               ` Bart Schaefer [this message]

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=1010509053748.ZM4390@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=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).