From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25285 invoked from network); 5 Jan 2007 13:52:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 5 Jan 2007 13:52:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 92008 invoked from network); 5 Jan 2007 13:52:22 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jan 2007 13:52:22 -0000 Received: (qmail 7069 invoked by alias); 5 Jan 2007 13:52:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23090 Received: (qmail 7060 invoked from network); 5 Jan 2007 13:52:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 5 Jan 2007 13:52:18 -0000 Received: (qmail 91722 invoked from network); 5 Jan 2007 13:52:18 -0000 Received: from cluster-c.mailcontrol.com (168.143.177.190) by a.mx.sunsite.dk with SMTP; 5 Jan 2007 13:52:14 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly25c.srv.mailcontrol.com (MailControl) with ESMTP id l05Dpar9010518 for ; Fri, 5 Jan 2007 13:51:54 GMT Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Fri, 5 Jan 2007 13:51:43 +0000 Date: Fri, 5 Jan 2007 13:51:40 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: configure should have --with-ncurses and --with-ncursesw Message-Id: <20070105135140.232b160e.pws@csr.com> In-Reply-To: <20070104111928.5e156466.pws@csr.com> References: <20061218143802.GX11091@prunille.vinc17.org> <20061218154652.a9a77e25.pws@csr.com> <20061219161216.GC7815@DervishD> <200612191622.kBJGMcXb005284@news01.csr.com> <20061225012304.GC31010@ay.vinc17.org> <20070104111928.5e156466.pws@csr.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 2.2.10 (GTK+ 2.10.4; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Jan 2007 13:51:43.0237 (UTC) FILETIME=[A1FCAB50:01C730D0] X-Scanned-By: MailControl A-07-06-00 (www.mailcontrol.com) on 10.67.0.135 Peter Stephenson wrote: > > To be able to use ncurses by default, I had to change the configure > > script: > > > > - termcap_curses_order="tinfo curses ncurses termcap" > > + termcap_curses_order="ncurses tinfo curses termcap" > > That looks harmless: I can't see why there might be a good reason for > preferring curses to ncurses. I'll have a go at this when I'm back in > normal operation (my home laptop power supply has died and I'm still > reeling from being back at work). OK, here is an attempt at doing this consistently. I've changed the search order. I've also changed the order in which we search for tigetflag (terminfo) and tgetent (termcap). The point of this is that if we find tigetflag in ncurses we then don't need to link against termcap as well. Much of the history of the termcap/terminfo/curses library search is probably irrelevant now, since we always try to link against terminfo in order to make the zsh/terminfo module to work and have done this for some time. I'm not sure we need --with-curses-terminfo any more. This now makes my Fedora system link against -lncurses, instead of -lcurses -ltermcap. Index: configure.ac =================================================================== RCS file: /cvsroot/zsh/zsh/configure.ac,v retrieving revision 1.60 diff -u -r1.60 configure.ac --- configure.ac 4 Dec 2006 11:24:10 -0000 1.60 +++ configure.ac 5 Jan 2007 13:05:47 -0000 @@ -637,20 +637,24 @@ AC_CHECK_LIB(m, pow) dnl Prefer BSD termcap library to SysV curses library, except on certain -dnl SYSV-derived systems. +dnl SYSV-derived systems. However, if we find terminfo and termcap +dnl stuff in the same library we will use that; typically this +dnl is ncurses or curses. dnl On HPUX, Hcurses is reported to work better than curses. +dnl Prefer ncurses to curses on all systems; prefer it to tinfo +dnl if we were told to use curses. tinfo isn't very common now. AC_ARG_WITH(curses-terminfo, AC_HELP_STRING([--with-curses-terminfo], [use terminfo support from curses library]), [if test x$withval = xyes; then - termcap_curses_order="tinfo curses ncurses termcap" + termcap_curses_order="ncurses tinfo curses termcap" AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order]) else - termcap_curses_order="tinfo termcap curses ncurses" + termcap_curses_order="tinfo termcap ncurses curses" fi], [case "$host_os" in hpux10.*|hpux11.*|solaris*) - termcap_curses_order="Hcurses curses ncurses termcap" ;; - *) termcap_curses_order="tinfo termcap curses ncurses" ;; + termcap_curses_order="Hcurses ncurses curses termcap" ;; + *) termcap_curses_order="tinfo termcap ncurses curses" ;; esac])dnl AH_TEMPLATE([HAVE_BOOLCODES], @@ -667,8 +671,13 @@ [Define if you have the terminfo strnames symbol.]) AH_TEMPLATE([TERM_H_NEEDS_CURSES_H], [Define if term.h chokes without curses.h.]) -AC_SEARCH_LIBS(tgetent, [$termcap_curses_order]) +dnl Check for tigetflag (terminfo) before tgetent (termcap). +dnl That's so that on systems where termcap and [n]curses are +dnl both available and both contain termcap functions, while +dnl only [n]curses contains terminfo functions, we only link against +dnl [n]curses. AC_SEARCH_LIBS(tigetflag, [$termcap_curses_order]) +AC_SEARCH_LIBS(tgetent, [$termcap_curses_order]) AC_CHECK_HEADERS(curses.h, [], [AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris, AC_TRY_COMPILE([#include ], [], -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php