diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-02 10:22:26 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-02 10:22:26 +0000 |
commit | 8b1246323f52121f9b647f6b052cd87bef73619e (patch) | |
tree | 65b285775450296a0c8da2cf880fd6b2bd3d24ee | |
parent | 0af9ef0d58a6bd495e5f0f4d7145d8fcb6abe9ea (diff) | |
download | zsh-8b1246323f52121f9b647f6b052cd87bef73619e.tar.gz zsh-8b1246323f52121f9b647f6b052cd87bef73619e.tar.xz zsh-8b1246323f52121f9b647f6b052cd87bef73619e.zip |
improve configuration handling of termcap/curses
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | INSTALL | 28 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | configure.ac | 18 |
4 files changed, 48 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index 52c8f4574..152865e85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-10-02 Peter Stephenson <pws@csr.com> + * 23896: configure.ac, INSTALL, README: replace + --with-curses-terminfo by --with-term-lib, which takes an + argument; fail if termcap/curses library not found; improve + installation documentation. + * 23883: Doc/Zsh/func.yo: try to improve precmd documentation. * Daniel Qarras: users/11915: Completion/Unix/Command/_module: diff --git a/INSTALL b/INSTALL index ab5bc3760..03f8c08a8 100644 --- a/INSTALL +++ b/INSTALL @@ -304,6 +304,34 @@ corresponds to that of builtin widgets. 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 takes a space-separated list +of libraries to try as its argument, so the default is equivalent to +--with-term-lib="tinfo termcap ncurses curses". It 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 --------------- diff --git a/README b/README index f8a7cf241..0337e10ff 100644 --- a/README +++ b/README @@ -34,6 +34,10 @@ Possible incompatibilities Since 4.2: +The configuration option --with-curses-terminfo has been replaced +by the option --with-term-lib="LIBS" where LIBS is a space-separated +list of libraries to search for termcap and curses features. + The option SH_WORD_SPLIT, used in Bourne/Korn/Posix shell compatibility mode, has been made more like other shells in the case of substitutions of the form ${1+"$@"} (a common trick used to work around problems in older diff --git a/configure.ac b/configure.ac index bb50986d5..215b48f04 100644 --- a/configure.ac +++ b/configure.ac @@ -641,12 +641,11 @@ 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="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 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_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>], [], |