]> ncurses.scripts.mit.edu Git - ncurses.git/blob - INSTALL
ncurses 5.2
[ncurses.git] / INSTALL
1 -- $Id: INSTALL,v 1.46 2000/10/14 17:57:02 Johnny.C.Lam Exp $
2 ---------------------------------------------------------------------
3              How to install Ncurses/Terminfo on your system
4 ---------------------------------------------------------------------
5
6     ************************************************************
7     * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
8     ************************************************************
9
10 You should be reading the file INSTALL in a directory called ncurses-d.d, where
11 d.d is the current version number.  There should be several subdirectories,
12 including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
13 and `test'.  See the README file for a roadmap to the package.
14
15 If you are a Linux or FreeBSD or NetBSD distribution integrator or packager,
16 please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR
17 below.
18
19 If you are converting from BSD curses and do not have root access, be sure
20 to read the BSD CONVERSION NOTES section below.
21
22 If you are using a version of XFree86 xterm older than 3.1.2F, see the section
23 on RECENT XTERM VERSIONS below.
24
25 If you are trying to build GNU Emacs using ncurses for terminal support,
26 read the USING NCURSES WITH EMACS section below.
27
28 If you are trying to build applications using gpm with ncurses,
29 read the USING NCURSES WITH GPM section below.
30
31 If you are running over the Andrew File System see the note below on
32 USING NCURSES WITH AFS.
33
34 If you are cross-compiling, see the note below on BUILDING NCURSES WITH A
35 CROSS-COMPILER.
36
37 If you want to build the Ada95 binding, go to the Ada95 directory and
38 follow the instructions there.  The Ada95 binding is not covered below.
39
40 If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based
41 i386 Unixes, go read the Portability section in the TO-DO file before you
42 do anything else.
43
44
45 REQUIREMENTS:
46 ------------
47
48 You will need the following in order to build and install ncurses under UNIX:
49
50         * ANSI C compiler  (gcc is recommended)
51         * sh               (bash will do)
52         * awk              (mawk or gawk will do)
53         * sed
54         * BSD or System V style install (a script is enclosed)
55
56 Ncurses has been also built in the OS/2 EMX environment.
57
58
59 INSTALLATION PROCEDURE:
60 ----------------------
61
62 1.  First, decide whether you want ncurses to replace your existing library (in
63     which case you'll need super-user privileges) or be installed in parallel
64     with it.
65
66     The --prefix option to configure changes the root directory for installing
67     ncurses.  The default is in subdirectories of /usr/local.  Use
68     --prefix=/usr to replace your default curses distribution.  This is the
69     default for Linux and BSD/OS users.
70
71     The package gets installed beneath the --prefix directory as follows:
72
73     In $(prefix)/bin:          tic, infocmp, captoinfo, tset,
74                                 reset, clear, tput, toe
75     In $(prefix)/lib:          libncurses*.* libcurses.a
76     In $(prefix)/share/terminfo: compiled terminal descriptions
77     In $(prefix)/include:      C header files
78     Under $(prefix)/man:       the manual pages
79
80     Note however that the configure script attempts to locate previous
81     installation of ncurses, and will set the default prefix according to where
82     it finds the ncurses headers.
83
84 2.  Type `./configure' in the top-level directory of the distribution to
85     configure ncurses for your operating system and create the Makefiles.
86     Besides --prefix, various configuration options are available to customize
87     the installation; use `./configure --help' to list the available options.
88
89     If your operating system is not supported, read the PORTABILITY section in
90     the file ncurses/README for information on how to create a configuration
91     file for your system.
92
93     The `configure' script generates makefile rules for one or more object
94     models and their associated libraries:
95
96         libncurses.a (normal)
97
98         libcurses.a (normal, a link to libncurses.a)
99                 This gets left out if you configure with --disable-overwrite.
100
101         libncurses.so (shared)
102
103         libncurses_g.a (debug)
104
105         libncurses_p.a (profile)
106
107         libncurses.la (libtool)
108
109     If you do not specify any models, the normal and debug libraries will be
110     configured.  Typing `configure' with no arguments is equivalent to:
111
112         ./configure --with-normal --with-debug --enable-overwrite
113
114     Typing
115
116         ./configure --with-shared
117
118     makes the shared libraries the default, resulting in
119
120         ./configure --with-shared --with-normal --with-debug --enable-overwrite
121
122     If you want only shared libraries, type
123
124         ./configure --with-shared --without-normal --without-debug
125
126     Rules for generating shared libraries are highly dependent upon the choice
127     of host system and compiler.  We've been testing shared libraries on Linux
128     and SunOS with gcc, but more work needs to be done to make shared libraries
129     work on other systems.
130
131     If you have libtool installed, you can type
132
133         ./configure --with-libtool
134
135     to generate the appropriate static and/or shared libraries for your
136     platform using libtool.
137
138     You can make curses and terminfo fall back to an existing file of termcap
139     definitions by configuring with --enable-termcap.  If you do this, the
140     library will search /etc/termcap before the terminfo database, and will
141     also interpret the contents of the TERM environment variable.  See the
142     section BSD CONVERSION NOTES below.
143
144 3.  Type `make'.  Ignore any warnings, no error messages should be produced.
145     This should compile the ncurses library, the terminfo compiler tic(1),
146     captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
147     programs (see the manual pages for explanation of what they do), some test
148     programs, and the panels, menus, and forms libraries.
149
150 4.  Run ncurses and several other test programs in the test directory to
151     verify that ncurses functions correctly before doing an install that
152     may overwrite system files.  Read the file test/README for details on
153     the test programs.
154
155     NOTE: You must have installed the terminfo database, or set the
156     environment variable $TERMINFO to point to a SVr4-compatible terminfo
157     database before running the test programs.  Not all vendors' terminfo
158     databases are SVr4-compatible, but most seem to be.  Exceptions include
159     DEC's Digital Unix (formerly known as OSF/1).
160
161     The ncurses program is designed specifically to test the ncurses library.
162     You can use it to verify that the screen highlights work correctly, that
163     cursor addressing and window scrolling works OK, etc.
164
165 5.  Once you've tested, you can type `make install' to install libraries,
166     the programs, the terminfo database and the manual pages.  Alternately, you
167     can type `make install' in each directory you want to install.  In the
168     top-level directory, you can do a partial install using these commands:
169
170         'make install.progs'    installs tic, infocmp, etc...
171         'make install.includes' installs the headers.
172         'make install.libs'     installs the libraries (and the headers).
173         'make install.data'     installs the terminfo data. (Note: `tic' must
174                                 be installed before the terminfo data can be
175                                 compiled).
176         'make install.man'      installs the manual pages.
177
178   ############################################################################
179   #     CAVEAT EMPTOR: `install.data' run as root will NUKE any existing     #
180   #  terminfo database. If you have any custom or unusual entries SAVE them  #
181   #  before you install ncurses.  I have a file called terminfo.custom for   #
182   #  this purpose.  Don't forget to run tic on the file once you're done.    #
183   ############################################################################
184
185     The terminfo(5) manual page must be preprocessed with tbl(1) before
186     being formatted by nroff(1).  Modern man(1) implementations tend to do
187     this by default, but you may want to look at your version's manual page
188     to be sure.  You may also install the manual pages after preprocessing
189     with tbl(1) by specifying the configure option --with-manpage-tbl.
190
191     If the system already has a curses library that you need to keep using
192     for some bizarre binary-compatibility reason, you'll need to distinguish
193     between it and ncurses. If ncurses is installed outside the standard
194     directories (/usr/include and /usr/lib) then all your users will need
195     to use the -I option to compile programs and -L to link them.
196
197     If you have BSD curses installed in your system and you accidentally
198     compile using its curses.h you'll end up with a large number of
199     undefined symbols at link time. _waddbytes is one of them.
200
201     IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
202     and run the `capconvert' script.  This script will deduce various things
203     about your environment and use them to build you a private terminfo tree,
204     so you can use ncurses applications.
205
206     If more than one user at your site does this, the space for the duplicate
207     trees is wasted.  Try to get your site administrators to install a system-
208     wide terminfo tree instead.
209
210     See the BSD CONVERSION NOTES section below for a few more details.
211
212 6.  The c++ directory has C++ classes that are built on top of ncurses and
213     panels.  You must have c++ (and its libraries) installed before you can
214     compile and run the demo.
215
216     Use --without-cxx-binding to tell configure to not build the C++ bindings
217     and demo.
218
219     If you do not have C++, you must use the --without-cxx option to tell
220     the configure script to not attempt to determine the type of 'bool'
221     which may be supported by C++.  IF YOU USE THIS OPTION, BE ADVISED THAT
222     YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++.
223
224 7.  If you're running an older Linux, you must either (a) tell Linux that the
225     console terminal type is `linux' or (b) make a link to or copy of the
226     linux entry in the appropriate place under your terminfo directory, named
227     `console'.  All 1.3 and many 1.2 distributions (including Yggdrasil and
228     Red Hat) already have the console type set to `linux'.
229
230     The way to change the wired-in console type depends on the configuration
231     of your system. This may involve editing /etc/inittab, /etc/ttytype,
232     /etc/profile and other such files.
233
234     Warning: this is not for the fainthearted, if you mess up your console
235     getty entries you can make your system unusable!  However, if you are
236     a distribution maker, this is the right thing to do (see the note for
237     integrators near the end of this file).
238
239     The easier way is to link or copy l/linux to c/console under your terminfo
240     directory.  Note: this will go away next time you do `make install.data'
241     and you'll have to redo it. There is no need to have entries for all
242     possible screen sizes, ncurses will figure out the size automatically.
243
244
245 SUMMARY OF CONFIGURE OPTIONS:
246 ----------------------------
247
248     The configure script provides a short list of its options when you type
249
250         ./configure --help
251
252     The --help and several options are common to all configure scripts that are
253     generated with autoconf.  Those are all listed before the line
254
255         --enable and --with options recognized:
256
257     The other options are specific to this package.  We list them in alphabetic
258     order.
259
260     --disable-assumed-color
261         With ncurses 5.1, we introduced a new function, assume_default_colors()
262         which allows applications to specify what the default foreground and
263         background color are assumed to be.  Most color applications use
264         full-screen color; but a few do not color the background.  While the
265         assumed values can be overridden by invoking assume_default_colors(),
266         you may find it useful to set the assumed values to the pre-5.1
267         convention, using this configure option.
268
269     --disable-big-core
270         Assume machine has little memory.  The configure script attempts to
271         determine if your machine has enough memory (about 6Mb) to compile the
272         terminfo database without writing portions to disk.  Some allocators
273         return deceptive results, so you may have to override the configure
274         script.  Or you may be building tic for a smaller machine.
275
276     --disable-database
277         Use only built-in data.  The ncurses libraries normally read terminfo
278         and termcap data from disk.  You can configure ncurses to have a
279         built-in database, aka "fallback" entries.  Embedded applications may
280         have no need for an external database.
281
282     --disable-ext-funcs
283         Disable function-extensions.  Configure ncurses without the functions
284         that are not specified by XSI.  See ncurses/modules for the exact
285         list of library modules that would be suppressed.
286
287     --disable-hashmap
288         Compile without hashmap scrolling-optimization code.  This algorithm is
289         the default.
290
291     --disable-leaks
292         For testing, compile-in code that frees memory that normally would not
293         be freed, to simplify analysis of memory-leaks.
294
295     --disable-macros
296         For testing, use functions rather than macros.  The program will run
297         more slowly, but it is simpler to debug.  This makes a header file
298         "nomacros.h".  See also the --enable-expanded option.
299
300     --disable-overwrite
301         If you are installing ncurses on a system which contains another
302         development version of curses, or which could be confused by the loader
303         for another version, we recommend that you leave out the link to
304         -lcurses.  The ncurses library is always available as -lncurses.
305         Disabling overwrite also causes the ncurses header files to be
306         installed into a subdirectory, e.g., /usr/local/include/ncurses,
307         rather than the include directory.  This makes it simpler to avoid
308         compile-time conflicts with other versions of curses.h
309
310     --disable-root-environ
311         Compile with environment restriction, so certain environment variables
312         are not available when running as root, or via a setuid/setgid
313         application.  These are (for example $TERMINFO) those that allow the
314         search path for the terminfo or termcap entry to be customized.
315
316     --disable-scroll-hints
317         Compile without scroll-hints code.  This option is ignored when
318         hashmap scrolling is configured, which is the default.
319
320     --enable-add-ons=DIR...
321         This is used to check if this package is a glibc add-on.  This is used
322         only by the glibc makefiles.
323
324     --enable-assertions
325         For testing, compile-in assertion code.  This is used only for a few
326         places where ncurses cannot easily recover by returning an error code.
327
328     --enable-broken_linker
329         A few platforms have what we consider a broken linker:  it cannot link
330         objects from an archive solely by referring to data objects in those
331         files, but requires a function reference.  This configure option
332         changes several data references to functions to work around this
333         problem.
334
335         NOTE:  With ncurses 5.1, this may not be necessary, since we are
336         told that some linkers interpret uninitialized global data as a
337         different type of reference which behaves as described above.  We have
338         explicitly initialized all of the global data to work around the
339         problem.
340
341     --enable-bsdpad
342         Recognize BSD-style prefix padding.  Some ancient BSD programs (such as
343         nethack) call tputs("50") to implement delays.
344
345     --enable-colorfgbg
346         Compile with experimental $COLORFGBG code.  That environment variable
347         is set by some terminal emulators as a hint to applications, by
348         advertising the default foreground and background colors.  During
349         initialization, ncurses sets color pair 0 to match this.
350
351     --enable-const
352         The curses interface as documented in XSI is rather old, in fact
353         including features that precede ANSI C.  The prototypes generally do
354         not make effective use of "const".  When using stricter compilers (or
355         gcc with appropriate warnings), you may see warnings about the mismatch
356         between const and non-const data.  We provide a configure option which
357         changes the interfaces to use const - quieting these warnings and
358         reflecting the actual use of the parameters more closely.  The ncurses
359         library uses the symbol NCURSES_CONST for these instances of const,
360         and if you have asked for compiler warnings, will add gcc's const-qual
361         warning.  There will still be warnings due to subtle inconsistencies
362         in the interface, but at a lower level.
363
364         NOTE:  configuring ncurses with this option may detract from the
365         portability of your applications by encouraging you to use const in
366         places where the XSI curses interface would not allow them.  Similar
367         issues arise when porting to SVr4 curses, which uses const in even
368         fewer places.
369
370     --enable-echo
371         Use the option --disable-echo to make the build-log less verbose by
372         suppressing the display of the compile and link commands.  This makes
373         it easier to see the compiler warnings.  (You can always use "make -n"
374         to see the options that are used).
375
376     --enable-expanded
377         For testing, generate functions for certain macros to make them visible
378         as such to the debugger.  See also the --disable-macros option.
379
380     --enable-getcap
381         Use the 4.4BSD getcap code if available, or a bundled version of it to
382         fetch termcap entries.  Entries read in this way cannot use (make
383         cross-references to) the terminfo tree, but it is faster than reading
384         /etc/termcap.
385
386     --enable-getcap-cache
387         Cache translated termcaps under the directory $HOME/.terminfo
388
389         NOTE:  this sounds good - it makes ncurses run faster the second time. 
390         But look where the data comes from - an /etc/termcap containing lots of
391         entries that are not up to date.  If you configure with this option and
392         forget to install the terminfo database before running an ncurses
393         application, you will end up with a hidden terminfo database that
394         generally does not support color and will miss some function keys.
395
396     --enable-hard-tabs
397         Compile-in cursor-optimization code that uses hard-tabs.  We would make
398         this a standard feature except for the concern that the terminfo entry
399         may not be accurate, or that your stty settings have disabled the use
400         of tabs.
401
402     --enable-no-padding
403         Compile-in support for the $NCURSES_NO_PADDING environment variable,
404         which allows you to suppress the effect of non-mandatory padding in
405         terminfo entries.  This is the default, unless you have disabled the
406         extended functions.
407
408     --enable-rpath
409         Use rpath option when generating shared libraries, and with some
410         restrictions when linking the corresponding programs.  This applies
411         mainly to systems using the GNU linker (read the manpage).
412
413     --enable-safe-sprintf
414         Compile with experimental safe-sprintf code.  You may consider using
415         this if you are building ncurses for a system that has neither
416         vsnprintf() or vsprintf().  It is slow, however.
417
418     --enable-sigwinch
419         Compile support for ncurses' SIGWINCH handler.  If your application has
420         its own SIGWINCH handler, ncurses will not use its own.  The ncurses
421         handler causes wgetch() to return KEY_RESIZE when the screen-size
422         changes.  This option is the default, unless you have disabled the
423         extended functions.
424
425     --enable-symlinks
426         If your system supports symbolic links, make tic use symbolic links
427         rather than hard links to save diskspace when writing aliases in the
428         terminfo database.
429
430     --enable-tcap-names
431         Compile-in support for user-definable terminal capabilities.  Use the
432         -x option of tic and infocmp to treat unrecognized terminal
433         capabilities as user-defined strings.  This option is the default,
434         unless you have disabled the extended functions.
435
436     --enable-termcap
437         Compile in support for reading terminal descriptions from termcap if no
438         match is found in the terminfo database.  See also the --enable-getcap
439         and --enable-getcap-cache options.
440
441     --enable-warnings
442         Turn on GCC compiler warnings.  There should be only a few.
443
444     --enable-widec
445         Compile with experimental wide-character code.  This makes a different
446         version of the libraries (e.g., libncursesw.so), which stores
447         characters in 16-bits.  We provide a simple UTF-8 driver and test
448         program to use this feature with terminals that can display UTF-8.
449
450         NOTE: applications compiled with this configuration are not compatible
451         with those built for 8-bit characters.  You cannot simply make a
452         symbolic link to equate libncurses.so with libncursesw.so
453
454     --enable-xmc-glitch
455         Compile-in support experimental xmc (magic cookie) code.
456
457     --with-ada-compiler=CMD
458         Specify the Ada95 compiler command (default "gnatmake")
459
460     --with-ada-include=DIR
461         Tell where to install the Ada includes (default: 
462         PREFIX/lib/ada/adainclude)
463
464     --with-ada-objects=DIR
465         Tell where to install the Ada objects (default:  PREFIX/lib/ada/adalib)
466
467     --with-database=XXX
468         Specify the terminfo source file to install.  Usually you will wish
469         to install ncurses' default (misc/terminfo.src).  Certain systems
470         have special requirements, e.g, OS/2 EMX has a customized terminfo
471         source file.
472
473     --with-dbmalloc
474         For testing, compile and link with Conor Cahill's dbmalloc library.
475
476     --with-debug
477         Generate debug-libraries (default).  These are named by adding "_g"
478         to the root, e.g., libncurses_g.a
479
480     --with-default-terminfo-dir=XXX
481         Specify the default terminfo database directory.  This is normally
482         DATADIR/terminfo, e.g., /usr/share/terminfo.
483
484     --with-develop
485         Enable experimental/development options.  This does not count those
486         that change the interface, such as --enable-widec.
487
488     --with-dmalloc
489         For testing, compile and link with Gray Watson's dmalloc library.
490
491     --with-fallbacks=XXX
492         Specify a list of fallback terminal descriptions which will be
493         compiled into the ncurses library.  See CONFIGURING FALLBACK ENTRIES.
494
495     --with-gpm
496         use Alessandro Rubini's GPM library to provide mouse support on the
497         Linux console.
498
499     --with-install-prefix=XXX
500         Allows you to specify an alternate location for installing ncurses
501         after building it.  The value you specify is prepended to the "real"
502         install location.  This simplifies making binary packages.
503
504         NOTE:  a few systems build shared libraries with fixed pathnames; this
505         option probably will not work for those configurations.
506
507      --with-libtool
508         Generate libraries with libtool.  If this option is selected, then
509         it overrides all other library model specifications.
510
511     --with-manpage-format=XXX
512         Tell the configure script how you would like to install man-pages.  The
513         option value must be one of these:  gzip, compress, BSDI, normal,
514         formatted.  If you do not give this option, the configure script
515         attempts to determine which is the case.
516
517     --with-manpage-renames=XXX
518         Tell the configure script that you wish to rename the manpages while
519         installing.  Currently the only distribution which does this is
520         the Linux Debian.  The option value specifies the name of a file
521         that lists the renamed files, e.g., $srcdir/man/man_db.renames
522
523     --with-manpage-symlinks
524         Tell the configure script that you wish to make symbolic links in the
525         man-directory for aliases to the man-pages.  This is the default, but
526         can be disabled for systems that provide this automatically.  Doing
527         this on systems that do not support symbolic links will result in
528         copying the man-page for each alias.
529
530     --with-manpage-tbl
531         Tell the configure script that you with to preprocess the manpages
532         by running them through tbl to generate tables understandable by
533         nroff.
534
535     --with-normal
536         Generate normal (i.e., static) libraries (default).
537
538     --with-profile
539         Generate profile-libraries These are named by adding "_p" to the root,
540         e.g., libncurses_p.a
541
542     --with-rcs-ids
543         Compile-in RCS identifiers.  Most of the C files have an identifier.
544
545     --with-shared
546         Generate shared-libraries.  The names given depend on the system for
547         which you are building, typically using a ".so" suffix, along with
548         symbolic links that refer to the release version.
549         
550         NOTE:  Unless you override the configure script by setting the $CFLAGS
551         environment variable, these will not be built with the -g debugging
552         option.
553
554     --with-shlib-version=XXX
555         Specify whether to use the release or ABI version for shared libraries.
556         This is normally chosen automatically based on the type of system
557         which you are building on.  We use it for testing the configure script.
558
559     --with-system-type=XXX
560         For testing, override the derived host system-type which is used to
561         decide things such as the linker commands used to build shared
562         libraries.  This is normally chosen automatically based on the type of
563         system which you are building on.  We use it for testing the configure
564         script.
565
566     --with-terminfo-dirs=XXX
567         Specify a search-list of terminfo directories which will be compiled
568         into the ncurses library (default: DATADIR/terminfo)
569
570     --with-termlib
571         When building the ncurses library, organize this as two parts:  the
572         curses library (libncurses) and the low-level terminfo library
573         (libtinfo).  This is done to accommodate applications that use only
574         the latter.  The terminfo library is about half the size of the total.
575
576     --without-ada
577         Suppress the configure script's check for Ada95, do not build the
578         Ada95 binding and related demo.
579
580     --without-curses-h
581         Don't install the ncurses header with the name "curses.h".  Rather,
582         install as "ncurses.h" and modify the installed headers and manpages
583         accordingly.
584
585     --without-cxx
586         XSI curses declares "bool" as part of the interface.  C++ also declares
587         "bool".  Neither specifies the size and type of booleans, but both
588         insist on the same name.  We chose to accommodate this by making the
589         configure script check for the size and type (e.g., unsigned or signed)
590         that your C++ compiler uses for booleans.  If you do not wish to use
591         ncurses with C++, use this option to tell the configure script to not
592         adjust ncurses bool to match C++.
593
594     --without-cxx-binding
595         Suppress the configure script's check for C++, do not build the
596         C++ binding and related demo.
597
598     --without-progs
599         Tell the configure script to suppress the build of ncurses' application
600         programs (e.g., tic).  The test applications will still be built if you
601         type "make", though not if you simply do "make install".
602
603
604 COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
605 --------------------------------------------
606
607     Because ncurses implements the X/Open Curses Specification, its interface
608     is fairly stable.  That does not mean the interface does not change.
609     Changes are made to the documented interfaces when we find differences
610     between ncurses and X/Open or implementations which they certify (such as
611     Solaris).  We add extensions to those interfaces to solve problems not
612     addressed by the original curses design, but those must not conflict with
613     the X/Open documentation.
614
615     Here are some of the major interface changes, and related problems which
616     you may encounter when building a system with different versions of
617     ncurses:
618
619     5.1 (July 8, 2000)
620         Interface changes:
621
622         + made the extended terminal capabilities
623           (configure --enable-tcap-names) a standard feature.  This should
624           be transparent to applications that do not require it.
625
626         + removed the trace() function and related trace support from the
627           production library.
628
629         + modified curses.h.in, undef'ing some symbols to avoid conflict
630           with C++ STL.
631
632         Added extensions:  assume_default_colors().
633
634     5.0 (October 23, 1999)
635         Interface changes:
636
637         + implemented the wcolor_set() and slk_color() functions.
638
639         + move macro winch to a function, to hide details of struct ldat
640
641         + corrected prototypes for slk_* functions, using chtype rather than
642           attr_t.
643
644         + the slk_attr_{set,off,on} functions need an additional void*
645           parameter according to XSI.
646
647         + modified several prototypes to correspond with 1997 version of X/Open
648           Curses:  [w]attr_get(), [w]attr_set(), border_set() have different
649           parameters.  Some functions were renamed or misspelled:
650           erase_wchar(), in_wchntr(), mvin_wchntr().  Some developers have used
651           attr_get().
652
653         Added extensions:  keybound(), curses_version().
654
655         Terminfo database changes:
656
657         + change translation for termcap 'rs' to terminfo 'rs2', which is
658           the documented equivalent, rather than 'rs1'.
659
660         The problems are subtler in recent releases.
661
662         a) This release provides users with the ability to define their own
663            terminal capability extensions, like termcap.  To accomplish this,
664            we redesigned the TERMTYPE struct (in term.h).  Very few
665            applications use this struct.  They must be recompiled to work with
666            the 5.0 library.
667
668         a) If you use the extended terminfo names (i.e., you used configure
669            --enable-tcap-names), the resulting terminfo database can have some
670            entries which are not readable by older versions of ncurses.  This
671            is a bug in the older versions:
672
673            + the terminfo database stores booleans, numbers and strings in
674              arrays.  The capabilities that are listed in the arrays are
675              specified by X/Open.  ncurses recognizes a number of obsolete and
676              extended names which are stored past the end of the specified
677              entries.
678
679            + a change to read_entry.c in 951001 made the library do an lseek()
680              call incorrectly skipping data which is already read from the
681              string array.  This happens when the number of strings in the
682              terminfo data file is greater than STRCOUNT, the number of
683              specified and obsolete or extended strings.
684
685            + as part of alignment with the X/Open final specification, in the
686              990109 patch we added two new terminfo capabilities:
687              set_a_attributes and set_pglen_inch).  This makes the indices for
688              the obsolete and extended capabilities shift up by 2.
689
690            + the last two capabilities in the obsolete/extended list are memu
691              and meml, which are found in most terminfo descriptions for xterm.
692
693              When trying to read this terminfo entry, the spurious lseek()
694              causes the library to attempt to read the final portion of the
695              terminfo data (the text of the string capabilities) 4 characters
696              past its starting point, and reads 4 characters too few.  The
697              library rejects the data, and applications are unable to
698              initialize that terminal type.
699
700            FIX: remove memu and meml from the xterm description.  They are
701            obsolete, not used by ncurses.  (It appears that the feature was
702            added to xterm to make it more like hpterm).
703
704            This is not a problem if you do not use the -x option of tic to
705            create a terminfo database with extended names.  Note that the
706            user-defined terminal capabilities are not affected by this bug,
707            since they are stored in a table after the older terminfo data ends,
708            and are invisible to the older libraries.
709
710         c) Some developers did not wish to use the C++ binding, and used the
711            configure --without-cxx option.  This causes problems if someone
712            uses the ncurses library from C++ because that configure test
713            determines the type for C++'s bool and makes ncurses match it, since
714            both C++ and curses are specified to declare bool.  Calling ncurses
715            functions with the incorrect type for bool will cause execution
716            errors.  In 5.0 we added a configure option "--without-cxx-binding"
717            which controls whether the binding itself is built and installed.
718
719     4.2 (March 2, 1998)
720         Interface changes:
721
722         + correct prototype for termattrs() as per XPG4 version 2.
723
724         + add placeholder prototypes for color_set(), erasewchar(),
725           term_attrs(), wcolor_set() as per XPG4 version 2.
726
727         + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
728           SVr4 headers.
729
730         New extensions: keyok() and define_key().
731
732         Terminfo database changes:
733
734         + corrected definition in curses.h for ACS_LANTERN, which was 'I'
735           rather than 'i'.
736
737     4.1 (May 15, 1997)
738
739         We added these extensions:  use_default_colors().  Also added
740         configure option --enable-const, to support the use of const where
741         X/Open should have, but did not, specify.
742
743         The terminfo database content changed the representation of color for
744         most entries that use ANSI colors.  SVr4 curses treats the setaf/setab
745         and setf/setb capabilities differently, interchanging the red/blue
746         colors in the latter.
747
748     4.0 (December 24, 1996)
749
750         We bumped to version 4.0 because the newly released dynamic loader
751         (ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL
752         versions were inconsistent.  At that point, ncurses ABI was 3.4 and the
753         REL was 1.9.9g, so we made them consistent.
754
755     1.9.9g (December 1, 1996)
756
757         This fixed most of the problems with 1.9.9e, and made these interface
758         changes:
759
760         + remove tparam(), which had been provided for compatibility with
761           some termcap.  tparm() is standard, and does not conflict with
762           application's fallback for missing tparam().
763
764         + turn off hardware echo in initscr().  This changes the sense of the
765           echo() function, which was initialized to echoing rather than
766           nonechoing (the latter is specified).  There were several other
767           corrections to the terminal I/O settings which cause applications to
768           behave differently.
769
770         + implemented several functions (such as attr_on()) which were
771           available only as macros.
772
773         + corrected several typos in curses.h.in (i.e., the mvXXXX macros).
774
775         + corrected prototypes for delay_output(),
776           has_color, immedok() and idcok().
777
778         + corrected misspelled getbkgd().  Some applications used the
779           misspelled name.
780
781         + added _yoffset to WINDOW.  The size of WINDOW does not impact
782           applications, since they use only pointers to WINDOW structs.
783
784         These changes were made to the terminfo database:
785
786         + removed boolean 'getm' which was available as an extended name.
787
788         We added these extensions: wresize(), resizeterm(), has_key() and
789         mcprint().
790
791     1.9.9e (March 24, 1996)
792
793         not recommended (a last-minute/untested change left the forms and
794         menus libraries unusable since they do not repaint the screen).
795         Foreground/background colors are combined incorrectly, working properly
796         only on a black background.  When this was released, the X/Open
797         specification was available only in draft form.
798
799         Some applications (such as lxdialog) were "fixed" to work with the
800         incorrect color scheme.
801
802
803 IF YOU ARE A SYSTEM INTEGRATOR:
804 ------------------------------
805
806     Beginning with 1.9.9, the ncurses distribution includes both a tset
807     utility and /usr/share/tabset directory.  If you are installing ncurses,
808     it is no longer either necessary or desirable to install tset-jv.
809
810     Configuration and Installation:
811
812         Configure with --prefix=/usr to make the install productions put
813         libraries and headers in the correct locations (overwriting any
814         previous curses libraries and headers).  This will put the terminfo
815         hierarchy under /usr/share/terminfo; you may want to override this with
816         --datadir=/usr/share/misc; terminfo and tabset are installed under the
817         data directory.
818
819         Please configure the ncurses library in a pure-terminfo mode; that
820         is, with the --disable-termcap option.   This will make the ncurses
821         library smaller and faster. The ncurses library includes a termcap
822         emulation that queries the terminfo database, so even applications
823         that use raw termcap to query terminal characteristics will win
824         (providing you recompile and relink them!).
825
826         If you must configure with termcap fallback enabled, you may also
827         wish to use the --enable-getcap option.  This option speeds up
828         termcap-based startups, at the expense of not allowing personal
829         termcap entries to reference the terminfo tree.  See the code in
830         ncurses/tinfo/read_termcap.c for details.
831
832         Note that if you have $TERMCAP set, ncurses will use that value
833         to locate termcap data.  In particular, running from xterm will
834         set $TERMCAP to the contents of the xterm's termcap entry.
835         If ncurses sees that, it will not examine /etc/termcap.
836
837     Keyboard Mapping:
838
839         The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48
840         reverse-tabulation sequence) rather than ^I.  Here are the loadkeys -d
841         mappings that will set this up:
842
843                 keycode  15 = Tab             Tab
844                         alt     keycode  15 = Meta_Tab
845                         shift   keycode  15 = F26
846                 string F26 ="\033[Z"
847
848     Naming the Console Terminal
849
850         In various Linuxes (and possibly elsewhere) there has been a practice
851         of designating the system console driver type as `console'.  Please
852         do not do this any more!  It complicates peoples' lives, because it
853         can mean that several different terminfo entries from different
854         operating systems all logically want to be called `console'.
855
856         Please pick a name unique to your console driver and set that up
857         in the /etc/inittab table or local equivalent.  Send the entry to the
858         terminfo maintainer (listed in the misc/terminfo file) to be included
859         in the terminfo file, if it's not already there.  See the
860         term(7) manual page included with this distribution for more on
861         conventions for choosing type names.
862
863         Here are some recommended primary console names:
864
865                 linux   -- Linux console driver
866                 freebsd -- FreeBSD
867                 netbsd  -- NetBSD
868                 bsdos   -- BSD/OS
869
870         If you are responsible for integrating ncurses for one of these
871         distribution, please either use the recommended name or get back
872         to us explaining why you don't want to, so we can work out nomenclature
873         that will make users' lives easier rather than harder.
874
875
876 RECENT XTERM VERSIONS:
877 ---------------------
878
879         The terminfo database file included with this distribution assumes you
880         are running an XFree86 xterm based on X11R6 (i.e., xterm-r6).  The
881         earlier X11R5 entry (xterm-r5) is provided as well.
882
883         If you are running XFree86 version 3.2 (actually 3.1.2F and up), you
884         should consider using the xterm-xf86-v32 (or later, the most recent
885         version is always named "xterm-xfree86") entry, which adds ANSI color
886         and the VT220 capabilities which have been added in XFree86.  If you
887         are running a mixed network, however, where this terminal description
888         may be used on an older xterm, you may have problems, since
889         applications that assume these capabilities will produce incorrect
890         output on the older xterm (e.g., highlighting is not cleared).
891
892
893 CONFIGURING FALLBACK ENTRIES:
894 ----------------------------
895
896         In order to support operation of ncurses programs before the terminfo
897         tree is accessible (that is, in single-user mode or at OS installation
898         time) the ncurses library can be compiled to include an array of
899         pre-fetched fallback entries.
900
901         These entries are checked by setupterm() only when the conventional
902         fetches from the terminfo tree and the termcap fallback (if configured)
903         have been tried and failed.  Thus, the presence of a fallback will not
904         shadow modifications to the on-disk entry for the same type, when that
905         entry is accessible.
906
907         By default, there are no entries on the fallback list.  After you
908         have built the ncurses suite for the first time, you can change
909         the list (the process needs infocmp(1)).  To do so, use the script
910         MKfallback.sh.  A configure script option --with-fallbacks does this
911         (it accepts a comma-separated list of the names you wish, and does
912         not require a rebuild).
913
914         If you wanted (say) to have linux, vt100, and xterm fallbacks, you
915         would use the commands
916
917                 cd ncurses;
918                 MKfallback.sh linux vt100 xterm >fallback.c
919
920         Then just rebuild and reinstall the library as you would normally.
921         You can restore the default empty fallback list with
922
923                 MKfallback.sh >fallback.c
924
925         The overhead for an empty fallback list is one trivial stub function.
926         Any non-empty fallback list is const-ed and therefore lives in sharable
927         text space.  You can look at the comment trailing each initializer in
928         the generated ncurses/fallback.c file to see the core cost of the
929         fallbacks.  A good rule of thumb for modern vt100-like entries is that
930         each one will cost about 2.5K of text space.
931
932
933 BSD CONVERSION NOTES:
934 --------------------
935
936         If you need to support really ancient BSD programs, you probably
937         want to configure with the --enable-bsdpad option.  What this does
938         is enable code in tputs() that recognizes a numeric prefix on a
939         capability as a request for that much trailing padding in milliseconds.
940         There are old BSD programs that do things like tputs("50").
941
942         (If you are distributing ncurses as a support-library component of
943         an application you probably want to put the remainder of this section
944         in the package README file.)
945
946         The following note applies only if you have configured ncurses with
947         --enable-termcap.
948
949 ------------------------------- CUT HERE --------------------------------
950
951 If you are installing this application privately (either because you
952 have no root access or want to experiment with it before doing a root
953 installation), there are a couple of details you need to be aware of.
954 They have to do with the ncurses library, which uses terminfo rather
955 than termcap for describing terminal characteristics.
956
957 Though the ncurses library is terminfo-based, it will interpret your
958 TERMCAP variable (if present), any local termcap files you reference
959 through it, and the system termcap file.  However, in order to avoid
960 slowing down your application startup, it will only do this once per
961 terminal type!
962
963 The first time you load a given terminal type from your termcap
964 database, the library initialization code will automatically write it
965 in terminfo format to a subdirectory under $HOME/.terminfo.  After
966 that, the initialization code will find it there and do a (much
967 faster) terminfo fetch.
968
969 Usually, all this means is that your home directory will silently grow
970 an invisible .terminfo subdirectory which will get filled in with
971 terminfo descriptions of terminal types as you invoke them.  If anyone
972 ever installs a global terminfo tree on your system, this will quietly
973 stop happening and your $HOME/.terminfo will become redundant.
974
975 The objective of all this logic is to make converting from BSD termcap
976 as painless as possible without slowing down your application (termcap
977 compilation is expensive).
978
979 If you don't have a TERMCAP variable or custom personal termcap file,
980 you can skip the rest of this dissertation.
981
982 If you *do* have a TERMCAP variable and/or a custom personal termcap file
983 that defines a terminal type, that definition will stop being visible
984 to this application after the first time you run it, because it will
985 instead see the terminfo entry that it wrote to $HOME/terminfo the
986 first time around.
987
988 Subsequently, editing the TERMCAP variable or personal TERMCAP file
989 will have no effect unless you explicitly remove the terminfo entry
990 under $HOME/terminfo.  If you do that, the entry will be recompiled
991 from your termcap resources the next time it is invoked.
992
993 To avoid these complications, use infocmp(1) and tic(1) to edit the
994 terminfo directory directly.
995
996 ------------------------------- CUT HERE --------------------------------
997
998 USING NCURSES WITH AFS:
999         AFS treats each directory as a separate logical filesystem, you
1000         can't hard-link across them.  The --enable-symlinks option copes
1001         with this by making tic use symbolic links.
1002
1003 USING NCURSES WITH EMACS:
1004         GNU Emacs has its own termcap support.  By default, it uses a mixture
1005         of those functions and code linked from the host system's libraries.
1006         You need to foil this and shut out the GNU termcap library entirely.
1007
1008         In order to do this, hack the Linux config file (s/linux.h) to contain
1009         a #define TERMINFO and set the symbol LIBS_TERMCAP to "-lncurses".
1010
1011         We have submitted such a change for the 19.30 release, so it may
1012         already be applied in your sources -- check for the #define TERMINFO.
1013
1014 USING NCURSES WITH GPM:
1015         Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
1016         which is used on Linux console.  Be aware that GPM is commonly
1017         installed as a shared library which contains a wrapper for the curses
1018         wgetch() function (libcurses.o).  Some integrators have simplified
1019         linking applications by combining all or part of libcurses.so (the BSD
1020         curses) into the libgpm.so file, producing symbol conflicts with
1021         ncurses (specifically the wgetch function).  You may be able to work
1022         around this problem by linking as follows:
1023
1024                 cc -o foo foo.o -lncurses -lgpm -lncurses
1025
1026         but the linker may not cooperate, producing mysterious errors.
1027         A patched version of gpm is available:
1028
1029                 dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz
1030
1031         This patch is incorporated in gpm 1.12; however some integrators
1032         are slow to update this library.  Current distributions of gpm can
1033         be configured properly using the --without-curses option.
1034
1035 BUILDING NCURSES WITH A CROSS-COMPILER
1036         Ncurses can be built with a cross-compiler.  Some parts must be built
1037         with the host's compiler since they are used for building programs
1038         (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
1039         that are compiled into the ncurses library.  You should set the
1040         BUILD_CC environment variable to your host's compiler, and run the
1041         configure script configuring for the cross-compiler.
1042
1043         Note that all of the generated source-files which are part of ncurses
1044         will be made if you use
1045
1046                 make sources
1047
1048         This would be useful in porting to an environment which has little
1049         support for the tools used to generate the sources, e.g., sed, awk and
1050         Bourne-shell.
1051
1052 BUGS:
1053         Send any feedback to the ncurses mailing list at
1054         bug-ncurses@gnu.org. To subscribe send mail to
1055         bug-ncurses-request@gnu.org with body that reads:
1056         subscribe ncurses <your-email-address-here>
1057
1058         The Hacker's Guide in the doc directory includes some guidelines
1059         on how to report bugs in ways that will get them fixed most quickly.