Permalink
Browse files

improve configuration handling of termcap/curses

  • Loading branch information...
1 parent 0af9ef0 commit 8b1246323f52121f9b647f6b052cd87bef73619e Peter Stephenson committed Oct 2, 2007
Showing with 48 additions and 7 deletions.
  1. +5 −0 ChangeLog
  2. +28 −0 INSTALL
  3. +4 −0 README
  4. +11 −7 configure.ac
View
@@ -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:
View
@@ -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
---------------
View
@@ -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
View
@@ -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>], [],

0 comments on commit 8b12463

Please sign in to comment.