From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23730 invoked from network); 16 Nov 2003 19:57:12 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 16 Nov 2003 19:57:12 -0000 Received: (qmail 25977 invoked by alias); 16 Nov 2003 19:57:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19254 Received: (qmail 25939 invoked from network); 16 Nov 2003 19:57:03 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 16 Nov 2003 19:57:03 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.92.193.19] by sunsite.dk (MessageWall 1.0.8) with SMTP; 16 Nov 2003 19:57:2 -0000 Received: from modem-250.anthias-fish.dialup.pol.co.uk ([62.136.224.250] helo=pwstephenson.fsnet.co.uk) by cmailm3.svr.pol.co.uk with esmtp (Exim 4.14) id 1ALT12-0004Vt-95 for zsh-workers@sunsite.dk; Sun, 16 Nov 2003 19:57:01 +0000 Received: by pwstephenson.fsnet.co.uk (Postfix, from userid 501) id 78B9D8543; Sun, 16 Nov 2003 15:00:52 -0500 (EST) Received: from pwstephenson.fsnet.co.uk (localhost [127.0.0.1]) by pwstephenson.fsnet.co.uk (Postfix) with ESMTP id 6BF8F851A for ; Sun, 16 Nov 2003 20:00:52 +0000 (GMT) To: zw Subject: Re: Build problem on terminfo.c on FreeBSD 4.7 In-reply-to: "Oliver Kiddle"'s message of "Fri, 14 Nov 2003 23:46:07 +0100." <7338.1068849967@athlon> Date: Sun, 16 Nov 2003 20:00:51 +0000 From: Peter Stephenson Message-Id: <20031116200052.78B9D8543@pwstephenson.fsnet.co.uk> Oliver Kiddle wrote: > # ifdef HAVE_CURSES_H > # include > # endif > > So curses.h would be included. However, HAVE_CURSES_H is not defined. > This seems to be because the curses.h header check is inside this in > zshconfig.ac: > case "$LIBS" in > *curses*) > This presumably fails because it uses just -ltermcap. > > libtermcap.so is just a link to libncurses.so here. So how is that > situation otherwise handled? Should the HAVE_SETUPTERM test perhaps > similarly only be done if $LIBS = *curses*? Or can we perhaps safely > substitute -1 for ERR? The original idea seemed to be the terminfo module was restricted to systems which used terminfo, which was taken to imply curses. However, it doesn't seem to have been taken into account everywhere, and I think the distinction is all a bit historical now. In particular, on many systems (like this one) termcap if it exists seems to be a vague pointer to curses anyway, so deliberately linking against -ltermcap is pointless. What's more, on some other systems termcap is only statically linked (possiably with hacked-out bits of curses, though I don't know that) while curses, with the same symbols and more, is dynamic. In short, it's a mess. Here, if curses is actually being used, whether in disguise or not, I think we have two choices (1) continue to use the logic that applies to termcap, i.e. not provide the functionality for terminfo (2) apply *all* the definitions that refer to curses, including any applicable HAVE_* stuff, changing configure as necessary. I don't think propagating a hybrid is a good idea. More generally, I think the thing to do is only compile a stub terminfo unless everything necessary is around (subject to the complications above of what this actually means). Probably even better would be not to attempt to compile it; this can be done with a suitable test (which might not be trivial, however) in the .mdd file. On my Linux system, the library is present but echoti simply says `not available on this system'. We could only compile the library at all on systems where we know it's going to work. There have been endless problems of this sort. I'd *really* like to get this sorted out before 4.1 becomes 4.2. -- Peter Stephenson Work: pws@csr.com Web: http://www.pwstephenson.fsnet.co.uk