zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: Daniel Qarras <dqarras@yahoo.com>,
	"Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: PATCH: curses linking improvements
Date: Tue, 2 Oct 2007 11:10:36 +0100	[thread overview]
Message-ID: <20071002111036.3b3a25a0@news01> (raw)
In-Reply-To: <20071002100154.1bf5c82a@news01>

On Tue, 2 Oct 2007 10:01:54 +0100
Peter Stephenson <pws@csr.com> wrote:
> configure checks for libraries and will see where the termcap/curses stuff
> can be found, but won't actually exit if it can't find it.
> 
> I would actually like to see this part of configure improved:  there are
> various hard-wired search orders for libraries controlled partly by
> --with-curses-terminfo and partly by system-specific tests.  However,
> --with-curses-terminfo is now basically useless and it would be better to
> turn it into a more general argument that gives a library search list.

This replaces --with-curses-terminfo with --with-term-lib="LIBS" and
documents the position, apparently for the first time.

Index: INSTALL
===================================================================
RCS file: /cvsroot/zsh/zsh/INSTALL,v
retrieving revision 1.30
diff -u -r1.30 INSTALL
--- INSTALL	21 May 2007 11:32:02 -0000	1.30
+++ INSTALL	2 Oct 2007 10:05:32 -0000
@@ -304,6 +304,34 @@
 
 See chapter 5 in the FAQ for some notes on multibyte input.
 
+Terminal Handling
+-----------------
+
+Historically, several different libraries have provided the features the
+shell needs to provide output to the terminal.  The most common have been
+termcap, which is now largely outmoded, and curses, which supersedes
+termcap and typically contains the same features as well as others.
+configure will search for an appropriate library; the default search order
+is "tinfo termcap ncurses curses" except on HP-UX and Solaris where it is
+"Hcurses ncurses curses termcap".  Note that even though termcap is usually
+searched first, zsh tries to make features from curses available and if the
+curses library contains both curses and termcap features, as is normal,
+the curses variant is used.  ncurses is a newer version of curses
+and tinfo is related to it.
+
+On some systems a suitable development package with a name such as
+curses-devel or ncurses-devel needs to be installed before zsh can
+be compiled.  This is likely to be contained on any installation media,
+or available for download.  It is highly unlikely that you will need to
+compile this from scratch.
+
+You can tell configure which libraries to search by passing an
+argument via --with-term-lib.  This can take a space-separated list
+of libraries to try, so the default is equivalent to
+--with-term-lib="tinfo termcap ncurses curses".  This replaces the
+old option --with-curses-terminfo, which altered the search order but
+didn't allow an explicit search list to be passed.
+
 Memory Routines
 ---------------
 
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.68
diff -u -r1.68 configure.ac
--- configure.ac	16 Aug 2007 10:54:40 -0000	1.68
+++ configure.ac	2 Oct 2007 10:05:33 -0000
@@ -641,12 +641,11 @@
 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="ncurses tinfo curses termcap"
+dnl Prefer ncurses to curses on all systems.  tinfo isn't very common now.
+AC_ARG_WITH(term-lib,
+AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]),
+[if test x$withval != xno && test x$withval != x ; then
+  termcap_curses_order="$withval"
   AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order])
 else
   termcap_curses_order="tinfo termcap ncurses curses"
@@ -677,7 +676,12 @@
 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_SEARCH_LIBS(tgetent, [$termcap_curses_order],
+  true,
+  AC_MSG_FAILURE(["No terminal handling library was found on your system.
+This is probably a library called 'curses' or 'ncurses'.  You may
+need to install a package called 'curses-devel' or 'ncurses-devel' on your
+system."], 255))
 AC_CHECK_HEADERS(curses.h, [],
 [AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris,
 AC_TRY_COMPILE([#include <curses.h>], [],


-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


           reply	other threads:[~2007-10-02 10:12 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20071002100154.1bf5c82a@news01>]

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=20071002111036.3b3a25a0@news01 \
    --to=pws@csr.com \
    --cc=dqarras@yahoo.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).