mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-17 12:41:14 +02:00
improve configuration handling of termcap/curses
This commit is contained in:
parent
0af9ef0d58
commit
8b1246323f
4 changed files with 48 additions and 7 deletions
|
@ -1,5 +1,10 @@
|
||||||
2007-10-02 Peter Stephenson <pws@csr.com>
|
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.
|
* 23883: Doc/Zsh/func.yo: try to improve precmd documentation.
|
||||||
|
|
||||||
* Daniel Qarras: users/11915: Completion/Unix/Command/_module:
|
* Daniel Qarras: users/11915: Completion/Unix/Command/_module:
|
||||||
|
|
28
INSTALL
28
INSTALL
|
@ -304,6 +304,34 @@ corresponds to that of builtin widgets.
|
||||||
|
|
||||||
See chapter 5 in the FAQ for some notes on multibyte input.
|
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
|
Memory Routines
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
|
|
4
README
4
README
|
@ -34,6 +34,10 @@ Possible incompatibilities
|
||||||
|
|
||||||
Since 4.2:
|
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
|
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
|
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
|
the form ${1+"$@"} (a common trick used to work around problems in older
|
||||||
|
|
18
configure.ac
18
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 stuff in the same library we will use that; typically this
|
||||||
dnl is ncurses or curses.
|
dnl is ncurses or curses.
|
||||||
dnl On HPUX, Hcurses is reported to work better than 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 Prefer ncurses to curses on all systems. tinfo isn't very common now.
|
||||||
dnl if we were told to use curses. tinfo isn't very common now.
|
AC_ARG_WITH(term-lib,
|
||||||
AC_ARG_WITH(curses-terminfo,
|
AC_HELP_STRING([--with-term-lib=LIBS], [search space-separated LIBS for terminal handling]),
|
||||||
AC_HELP_STRING([--with-curses-terminfo], [use terminfo support from curses library]),
|
[if test x$withval != xno && test x$withval != x ; then
|
||||||
[if test x$withval = xyes; then
|
termcap_curses_order="$withval"
|
||||||
termcap_curses_order="ncurses tinfo curses termcap"
|
|
||||||
AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order])
|
AC_SEARCH_LIBS(tigetstr, [$termcap_curses_order])
|
||||||
else
|
else
|
||||||
termcap_curses_order="tinfo termcap ncurses curses"
|
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 only [n]curses contains terminfo functions, we only link against
|
||||||
dnl [n]curses.
|
dnl [n]curses.
|
||||||
AC_SEARCH_LIBS(tigetflag, [$termcap_curses_order])
|
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_CHECK_HEADERS(curses.h, [],
|
||||||
[AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris,
|
[AC_CACHE_CHECK(for Solaris 8 curses.h mistake, ac_cv_header_curses_solaris,
|
||||||
AC_TRY_COMPILE([#include <curses.h>], [],
|
AC_TRY_COMPILE([#include <curses.h>], [],
|
||||||
|
|
Loading…
Reference in a new issue