]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ncurses/INSTALL
This commit was generated by cvs2svn to compensate for changes in r156369,
[FreeBSD/FreeBSD.git] / contrib / ncurses / INSTALL
1 -- $Id: INSTALL,v 1.52 2002/01/12 22:56:44 tom 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.  Some, but not all of the
281         programs are useful in this configuration, e.g., reset and tput versus
282         infocmp and tic.
283
284     --disable-ext-funcs
285         Disable function-extensions.  Configure ncurses without the functions
286         that are not specified by XSI.  See ncurses/modules for the exact
287         list of library modules that would be suppressed.
288
289     --disable-hashmap
290         Compile without hashmap scrolling-optimization code.  This algorithm is
291         the default.
292
293     --disable-leaks
294         For testing, compile-in code that frees memory that normally would not
295         be freed, to simplify analysis of memory-leaks.
296
297     --disable-macros
298         For testing, use functions rather than macros.  The program will run
299         more slowly, but it is simpler to debug.  This makes a header file
300         "nomacros.h".  See also the --enable-expanded option.
301
302     --disable-overwrite
303         If you are installing ncurses on a system which contains another
304         development version of curses, or which could be confused by the loader
305         for another version, we recommend that you leave out the link to
306         -lcurses.  The ncurses library is always available as -lncurses.
307         Disabling overwrite also causes the ncurses header files to be
308         installed into a subdirectory, e.g., /usr/local/include/ncurses,
309         rather than the include directory.  This makes it simpler to avoid
310         compile-time conflicts with other versions of curses.h
311
312     --disable-root-environ
313         Compile with environment restriction, so certain environment variables
314         are not available when running as root, or via a setuid/setgid
315         application.  These are (for example $TERMINFO) those that allow the
316         search path for the terminfo or termcap entry to be customized.
317
318     --disable-scroll-hints
319         Compile without scroll-hints code.  This option is ignored when
320         hashmap scrolling is configured, which is the default.
321
322     --enable-add-ons=DIR...
323         This is used to check if this package is a glibc add-on.  This is used
324         only by the glibc makefiles.
325
326     --enable-assertions
327         For testing, compile-in assertion code.  This is used only for a few
328         places where ncurses cannot easily recover by returning an error code.
329
330     --enable-broken_linker
331         A few platforms have what we consider a broken linker:  it cannot link
332         objects from an archive solely by referring to data objects in those
333         files, but requires a function reference.  This configure option
334         changes several data references to functions to work around this
335         problem.
336
337         NOTE:  With ncurses 5.1, this may not be necessary, since we are
338         told that some linkers interpret uninitialized global data as a
339         different type of reference which behaves as described above.  We have
340         explicitly initialized all of the global data to work around the
341         problem.
342
343     --enable-bsdpad
344         Recognize BSD-style prefix padding.  Some ancient BSD programs (such as
345         nethack) call tputs("50") to implement delays.
346
347     --enable-colorfgbg
348         Compile with experimental $COLORFGBG code.  That environment variable
349         is set by some terminal emulators as a hint to applications, by
350         advertising the default foreground and background colors.  During
351         initialization, ncurses sets color pair 0 to match this.
352
353     --enable-const
354         The curses interface as documented in XSI is rather old, in fact
355         including features that precede ANSI C.  The prototypes generally do
356         not make effective use of "const".  When using stricter compilers (or
357         gcc with appropriate warnings), you may see warnings about the mismatch
358         between const and non-const data.  We provide a configure option which
359         changes the interfaces to use const - quieting these warnings and
360         reflecting the actual use of the parameters more closely.  The ncurses
361         library uses the symbol NCURSES_CONST for these instances of const,
362         and if you have asked for compiler warnings, will add gcc's const-qual
363         warning.  There will still be warnings due to subtle inconsistencies
364         in the interface, but at a lower level.
365
366         NOTE:  configuring ncurses with this option may detract from the
367         portability of your applications by encouraging you to use const in
368         places where the XSI curses interface would not allow them.  Similar
369         issues arise when porting to SVr4 curses, which uses const in even
370         fewer places.
371
372     --enable-echo
373         Use the option --disable-echo to make the build-log less verbose by
374         suppressing the display of the compile and link commands.  This makes
375         it easier to see the compiler warnings.  (You can always use "make -n"
376         to see the options that are used).
377
378     --enable-expanded
379         For testing, generate functions for certain macros to make them visible
380         as such to the debugger.  See also the --disable-macros option.
381
382     --enable-getcap
383         Use the 4.4BSD getcap code if available, or a bundled version of it to
384         fetch termcap entries.  Entries read in this way cannot use (make
385         cross-references to) the terminfo tree, but it is faster than reading
386         /etc/termcap.
387
388     --enable-getcap-cache
389         Cache translated termcaps under the directory $HOME/.terminfo
390
391         NOTE:  this sounds good - it makes ncurses run faster the second time. 
392         But look where the data comes from - an /etc/termcap containing lots of
393         entries that are not up to date.  If you configure with this option and
394         forget to install the terminfo database before running an ncurses
395         application, you will end up with a hidden terminfo database that
396         generally does not support color and will miss some function keys.
397
398     --enable-hard-tabs
399         Compile-in cursor-optimization code that uses hard-tabs.  We would make
400         this a standard feature except for the concern that the terminfo entry
401         may not be accurate, or that your stty settings have disabled the use
402         of tabs.
403
404     --enable-no-padding
405         Compile-in support for the $NCURSES_NO_PADDING environment variable,
406         which allows you to suppress the effect of non-mandatory padding in
407         terminfo entries.  This is the default, unless you have disabled the
408         extended functions.
409
410     --enable-rpath
411         Use rpath option when generating shared libraries, and with some
412         restrictions when linking the corresponding programs.  This applies
413         mainly to systems using the GNU linker (read the manpage).
414
415     --enable-safe-sprintf
416         Compile with experimental safe-sprintf code.  You may consider using
417         this if you are building ncurses for a system that has neither
418         vsnprintf() or vsprintf().  It is slow, however.
419
420     --enable-sigwinch
421         Compile support for ncurses' SIGWINCH handler.  If your application has
422         its own SIGWINCH handler, ncurses will not use its own.  The ncurses
423         handler causes wgetch() to return KEY_RESIZE when the screen-size
424         changes.  This option is the default, unless you have disabled the
425         extended functions.
426
427     --enable-symlinks
428         If your system supports symbolic links, make tic use symbolic links
429         rather than hard links to save diskspace when writing aliases in the
430         terminfo database.
431
432     --enable-tcap-names
433         Compile-in support for user-definable terminal capabilities.  Use the
434         -x option of tic and infocmp to treat unrecognized terminal
435         capabilities as user-defined strings.  This option is the default,
436         unless you have disabled the extended functions.
437
438     --enable-termcap
439         Compile in support for reading terminal descriptions from termcap if no
440         match is found in the terminfo database.  See also the --enable-getcap
441         and --enable-getcap-cache options.
442
443     --enable-warnings
444         Turn on GCC compiler warnings.  There should be only a few.
445
446     --enable-widec
447         Compile with experimental wide-character code.  This makes a different
448         version of the libraries (e.g., libncursesw.so), which stores
449         characters in 16-bits.  We provide a simple UTF-8 driver and test
450         program to use this feature with terminals that can display UTF-8.
451
452         NOTE: applications compiled with this configuration are not compatible
453         with those built for 8-bit characters.  You cannot simply make a
454         symbolic link to equate libncurses.so with libncursesw.so
455
456     --enable-xmc-glitch
457         Compile-in support experimental xmc (magic cookie) code.
458
459     --with-ada-compiler=CMD
460         Specify the Ada95 compiler command (default "gnatmake")
461
462     --with-ada-include=DIR
463         Tell where to install the Ada includes (default: 
464         PREFIX/lib/ada/adainclude)
465
466     --with-ada-objects=DIR
467         Tell where to install the Ada objects (default:  PREFIX/lib/ada/adalib)
468
469     --with-bool=TYPE
470         If --without-cxx is specified, override the type used for the "bool"
471         declared in curses.h (normally the type is automatically chosen to
472         correspond with that in <stdbool.h>, or defaults to platform-specific
473         sizes).
474
475     --with-build-cc=XXX
476         If cross-compiling, specify a host C compiler, which is needed to
477         compile a few utilties which generate source modules for ncurses.
478         If you do not give this option, the configure script checks if the
479         $BUILD_CC variable is set, and otherwise defaults to gcc or cc.
480
481     --with-build-cflags=XXX
482         If cross-compiling, specify the host C compiler-flags.  You might need
483         to do this if the target compiler has unusual flags which confuse the
484         host compiler.
485
486     --with-build-ldflags=XXX
487         If cross-compiling, specify the host linker-flags.  You might need to
488         do this if the target linker has unusual flags which confuse the host
489         compiler.
490
491     --with-build-libs=XXX
492         If cross-compiling, the host libraries.  You might need to do this if
493         the target environment requires unusual libraries.
494
495     --with-caps=XXX
496         Specify an alternate terminfo capabilities file, which makes the
497         configure script look for "include/Caps.XXX".  A few systems, e.g.,
498         AIX 4.x use the same overall file-format as ncurses for terminfo
499         data, but use different alignments within the tables to support
500         legacy applications.  For those systems, you can configure ncurses
501         to use a terminfo database which is compatible with the native
502         applications.
503
504     --with-database=XXX
505         Specify the terminfo source file to install.  Usually you will wish
506         to install ncurses' default (misc/terminfo.src).  Certain systems
507         have special requirements, e.g, OS/2 EMX has a customized terminfo
508         source file.
509
510     --with-dbmalloc
511         For testing, compile and link with Conor Cahill's dbmalloc library.
512
513     --with-debug
514         Generate debug-libraries (default).  These are named by adding "_g"
515         to the root, e.g., libncurses_g.a
516
517     --with-default-terminfo-dir=XXX
518         Specify the default terminfo database directory.  This is normally
519         DATADIR/terminfo, e.g., /usr/share/terminfo.
520
521     --with-develop
522         Enable experimental/development options.  This does not count those
523         that change the interface, such as --enable-widec.
524
525     --with-dmalloc
526         For testing, compile and link with Gray Watson's dmalloc library.
527
528     --with-fallbacks=XXX
529         Specify a list of fallback terminal descriptions which will be
530         compiled into the ncurses library.  See CONFIGURING FALLBACK ENTRIES.
531
532     --with-gpm
533         use Alessandro Rubini's GPM library to provide mouse support on the
534         Linux console.
535
536     --with-install-prefix=XXX
537         Allows you to specify an alternate location for installing ncurses
538         after building it.  The value you specify is prepended to the "real"
539         install location.  This simplifies making binary packages.
540
541         NOTE:  a few systems build shared libraries with fixed pathnames; this
542         option probably will not work for those configurations.
543
544      --with-libtool
545         Generate libraries with libtool.  If this option is selected, then
546         it overrides all other library model specifications.
547
548     --with-manpage-format=XXX
549         Tell the configure script how you would like to install man-pages.  The
550         option value must be one of these:  gzip, compress, BSDI, normal,
551         formatted.  If you do not give this option, the configure script
552         attempts to determine which is the case.
553
554     --with-manpage-renames=XXX
555         Tell the configure script that you wish to rename the manpages while
556         installing.  Currently the only distribution which does this is
557         the Linux Debian.  The option value specifies the name of a file
558         that lists the renamed files, e.g., $srcdir/man/man_db.renames
559
560     --with-manpage-symlinks
561         Tell the configure script that you wish to make symbolic links in the
562         man-directory for aliases to the man-pages.  This is the default, but
563         can be disabled for systems that provide this automatically.  Doing
564         this on systems that do not support symbolic links will result in
565         copying the man-page for each alias.
566
567     --with-manpage-tbl
568         Tell the configure script that you with to preprocess the manpages
569         by running them through tbl to generate tables understandable by
570         nroff.
571
572     --with-ospeed=TYPE
573         Override type of ospeed variable, which is part of the termcap
574         compatibility interface.  In termcap, this is a 'short', which works
575         for a wide range of baudrates because ospeed is not the actual speed
576         but the encoded value, e.g., B9600 would be a small number such as 13. 
577         However the encoding scheme originally allowed for values "only" up to
578         38400bd.  A newer set of definitions past 38400bd is not encoded as
579         compactly, and is not guaranteed to fit into a short (see the function
580         cfgetospeed(), which returns a speed_t for this reason).  In practice,
581         applications that required knowledge of the ospeed variable, i.e.,
582         those using termcap, do not use the higher speeds.  Your application
583         (or system, in general) may or may not.
584
585     --with-normal
586         Generate normal (i.e., static) libraries (default).
587
588     --with-profile
589         Generate profile-libraries These are named by adding "_p" to the root,
590         e.g., libncurses_p.a
591
592     --with-rcs-ids
593         Compile-in RCS identifiers.  Most of the C files have an identifier.
594
595     --with-shared
596         Generate shared-libraries.  The names given depend on the system for
597         which you are building, typically using a ".so" suffix, along with
598         symbolic links that refer to the release version.
599         
600         NOTE:  Unless you override the configure script by setting the $CFLAGS
601         environment variable, these will not be built with the -g debugging
602         option.
603
604     --with-shlib-version=XXX
605         Specify whether to use the release or ABI version for shared libraries.
606         This is normally chosen automatically based on the type of system
607         which you are building on.  We use it for testing the configure script.
608
609     --with-system-type=XXX
610         For testing, override the derived host system-type which is used to
611         decide things such as the linker commands used to build shared
612         libraries.  This is normally chosen automatically based on the type of
613         system which you are building on.  We use it for testing the configure
614         script.
615
616     --with-terminfo-dirs=XXX
617         Specify a search-list of terminfo directories which will be compiled
618         into the ncurses library (default: DATADIR/terminfo)
619
620     --with-termlib
621         When building the ncurses library, organize this as two parts:  the
622         curses library (libncurses) and the low-level terminfo library
623         (libtinfo).  This is done to accommodate applications that use only
624         the latter.  The terminfo library is about half the size of the total.
625
626     --with-termpath=XXX
627         Specify a search-list of termcap files which will be compiled into the
628         ncurses library (default:  /etc/termcap:/usr/share/misc/termcap)
629
630     --without-ada
631         Suppress the configure script's check for Ada95, do not build the
632         Ada95 binding and related demo.
633
634     --without-curses-h
635         Don't install the ncurses header with the name "curses.h".  Rather,
636         install as "ncurses.h" and modify the installed headers and manpages
637         accordingly.
638
639     --without-cxx
640         XSI curses declares "bool" as part of the interface.  C++ also declares
641         "bool".  Neither specifies the size and type of booleans, but both
642         insist on the same name.  We chose to accommodate this by making the
643         configure script check for the size and type (e.g., unsigned or signed)
644         that your C++ compiler uses for booleans.  If you do not wish to use
645         ncurses with C++, use this option to tell the configure script to not
646         adjust ncurses bool to match C++.
647
648     --without-cxx-binding
649         Suppress the configure script's check for C++, do not build the
650         C++ binding and related demo.
651
652     --without-progs
653         Tell the configure script to suppress the build of ncurses' application
654         programs (e.g., tic).  The test applications will still be built if you
655         type "make", though not if you simply do "make install".
656
657
658 COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
659 --------------------------------------------
660
661     Because ncurses implements the X/Open Curses Specification, its interface
662     is fairly stable.  That does not mean the interface does not change.
663     Changes are made to the documented interfaces when we find differences
664     between ncurses and X/Open or implementations which they certify (such as
665     Solaris).  We add extensions to those interfaces to solve problems not
666     addressed by the original curses design, but those must not conflict with
667     the X/Open documentation.
668
669     Here are some of the major interface changes, and related problems which
670     you may encounter when building a system with different versions of
671     ncurses:
672
673     5.2 (October 21, 2000)
674         Interface changes:
675
676         + revert termcap ospeed variable to 'short' (see discussion of the
677           --with-ospeed configure option).
678
679     5.1 (July 8, 2000)
680         Interface changes:
681
682         + made the extended terminal capabilities
683           (configure --enable-tcap-names) a standard feature.  This should
684           be transparent to applications that do not require it.
685
686         + removed the trace() function and related trace support from the
687           production library.
688
689         + modified curses.h.in, undef'ing some symbols to avoid conflict
690           with C++ STL.
691
692         Added extensions:  assume_default_colors().
693
694     5.0 (October 23, 1999)
695         Interface changes:
696
697         + implemented the wcolor_set() and slk_color() functions.
698
699         + move macro winch to a function, to hide details of struct ldat
700
701         + corrected prototypes for slk_* functions, using chtype rather than
702           attr_t.
703
704         + the slk_attr_{set,off,on} functions need an additional void*
705           parameter according to XSI.
706
707         + modified several prototypes to correspond with 1997 version of X/Open
708           Curses:  [w]attr_get(), [w]attr_set(), border_set() have different
709           parameters.  Some functions were renamed or misspelled:
710           erase_wchar(), in_wchntr(), mvin_wchntr().  Some developers have used
711           attr_get().
712
713         Added extensions:  keybound(), curses_version().
714
715         Terminfo database changes:
716
717         + change translation for termcap 'rs' to terminfo 'rs2', which is
718           the documented equivalent, rather than 'rs1'.
719
720         The problems are subtler in recent releases.
721
722         a) This release provides users with the ability to define their own
723            terminal capability extensions, like termcap.  To accomplish this,
724            we redesigned the TERMTYPE struct (in term.h).  Very few
725            applications use this struct.  They must be recompiled to work with
726            the 5.0 library.
727
728         a) If you use the extended terminfo names (i.e., you used configure
729            --enable-tcap-names), the resulting terminfo database can have some
730            entries which are not readable by older versions of ncurses.  This
731            is a bug in the older versions:
732
733            + the terminfo database stores booleans, numbers and strings in
734              arrays.  The capabilities that are listed in the arrays are
735              specified by X/Open.  ncurses recognizes a number of obsolete and
736              extended names which are stored past the end of the specified
737              entries.
738
739            + a change to read_entry.c in 951001 made the library do an lseek()
740              call incorrectly skipping data which is already read from the
741              string array.  This happens when the number of strings in the
742              terminfo data file is greater than STRCOUNT, the number of
743              specified and obsolete or extended strings.
744
745            + as part of alignment with the X/Open final specification, in the
746              990109 patch we added two new terminfo capabilities:
747              set_a_attributes and set_pglen_inch).  This makes the indices for
748              the obsolete and extended capabilities shift up by 2.
749
750            + the last two capabilities in the obsolete/extended list are memu
751              and meml, which are found in most terminfo descriptions for xterm.
752
753              When trying to read this terminfo entry, the spurious lseek()
754              causes the library to attempt to read the final portion of the
755              terminfo data (the text of the string capabilities) 4 characters
756              past its starting point, and reads 4 characters too few.  The
757              library rejects the data, and applications are unable to
758              initialize that terminal type.
759
760            FIX: remove memu and meml from the xterm description.  They are
761            obsolete, not used by ncurses.  (It appears that the feature was
762            added to xterm to make it more like hpterm).
763
764            This is not a problem if you do not use the -x option of tic to
765            create a terminfo database with extended names.  Note that the
766            user-defined terminal capabilities are not affected by this bug,
767            since they are stored in a table after the older terminfo data ends,
768            and are invisible to the older libraries.
769
770         c) Some developers did not wish to use the C++ binding, and used the
771            configure --without-cxx option.  This causes problems if someone
772            uses the ncurses library from C++ because that configure test
773            determines the type for C++'s bool and makes ncurses match it, since
774            both C++ and curses are specified to declare bool.  Calling ncurses
775            functions with the incorrect type for bool will cause execution
776            errors.  In 5.0 we added a configure option "--without-cxx-binding"
777            which controls whether the binding itself is built and installed.
778
779     4.2 (March 2, 1998)
780         Interface changes:
781
782         + correct prototype for termattrs() as per XPG4 version 2.
783
784         + add placeholder prototypes for color_set(), erasewchar(),
785           term_attrs(), wcolor_set() as per XPG4 version 2.
786
787         + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
788           SVr4 headers.
789
790         New extensions: keyok() and define_key().
791
792         Terminfo database changes:
793
794         + corrected definition in curses.h for ACS_LANTERN, which was 'I'
795           rather than 'i'.
796
797     4.1 (May 15, 1997)
798
799         We added these extensions:  use_default_colors().  Also added
800         configure option --enable-const, to support the use of const where
801         X/Open should have, but did not, specify.
802
803         The terminfo database content changed the representation of color for
804         most entries that use ANSI colors.  SVr4 curses treats the setaf/setab
805         and setf/setb capabilities differently, interchanging the red/blue
806         colors in the latter.
807
808     4.0 (December 24, 1996)
809
810         We bumped to version 4.0 because the newly released dynamic loader
811         (ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL
812         versions were inconsistent.  At that point, ncurses ABI was 3.4 and the
813         REL was 1.9.9g, so we made them consistent.
814
815     1.9.9g (December 1, 1996)
816
817         This fixed most of the problems with 1.9.9e, and made these interface
818         changes:
819
820         + remove tparam(), which had been provided for compatibility with
821           some termcap.  tparm() is standard, and does not conflict with
822           application's fallback for missing tparam().
823
824         + turn off hardware echo in initscr().  This changes the sense of the
825           echo() function, which was initialized to echoing rather than
826           nonechoing (the latter is specified).  There were several other
827           corrections to the terminal I/O settings which cause applications to
828           behave differently.
829
830         + implemented several functions (such as attr_on()) which were
831           available only as macros.
832
833         + corrected several typos in curses.h.in (i.e., the mvXXXX macros).
834
835         + corrected prototypes for delay_output(),
836           has_color, immedok() and idcok().
837
838         + corrected misspelled getbkgd().  Some applications used the
839           misspelled name.
840
841         + added _yoffset to WINDOW.  The size of WINDOW does not impact
842           applications, since they use only pointers to WINDOW structs.
843
844         These changes were made to the terminfo database:
845
846         + removed boolean 'getm' which was available as an extended name.
847
848         We added these extensions: wresize(), resizeterm(), has_key() and
849         mcprint().
850
851     1.9.9e (March 24, 1996)
852
853         not recommended (a last-minute/untested change left the forms and
854         menus libraries unusable since they do not repaint the screen).
855         Foreground/background colors are combined incorrectly, working properly
856         only on a black background.  When this was released, the X/Open
857         specification was available only in draft form.
858
859         Some applications (such as lxdialog) were "fixed" to work with the
860         incorrect color scheme.
861
862
863 IF YOU ARE A SYSTEM INTEGRATOR:
864 ------------------------------
865
866     Beginning with 1.9.9, the ncurses distribution includes both a tset
867     utility and /usr/share/tabset directory.  If you are installing ncurses,
868     it is no longer either necessary or desirable to install tset-jv.
869
870     Configuration and Installation:
871
872         Configure with --prefix=/usr to make the install productions put
873         libraries and headers in the correct locations (overwriting any
874         previous curses libraries and headers).  This will put the terminfo
875         hierarchy under /usr/share/terminfo; you may want to override this with
876         --datadir=/usr/share/misc; terminfo and tabset are installed under the
877         data directory.
878
879         Please configure the ncurses library in a pure-terminfo mode; that
880         is, with the --disable-termcap option.   This will make the ncurses
881         library smaller and faster. The ncurses library includes a termcap
882         emulation that queries the terminfo database, so even applications
883         that use raw termcap to query terminal characteristics will win
884         (providing you recompile and relink them!).
885
886         If you must configure with termcap fallback enabled, you may also
887         wish to use the --enable-getcap option.  This option speeds up
888         termcap-based startups, at the expense of not allowing personal
889         termcap entries to reference the terminfo tree.  See the code in
890         ncurses/tinfo/read_termcap.c for details.
891
892         Note that if you have $TERMCAP set, ncurses will use that value
893         to locate termcap data.  In particular, running from xterm will
894         set $TERMCAP to the contents of the xterm's termcap entry.
895         If ncurses sees that, it will not examine /etc/termcap.
896
897     Keyboard Mapping:
898
899         The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48
900         reverse-tabulation sequence) rather than ^I.  Here are the loadkeys -d
901         mappings that will set this up:
902
903                 keycode  15 = Tab             Tab
904                         alt     keycode  15 = Meta_Tab
905                         shift   keycode  15 = F26
906                 string F26 ="\033[Z"
907
908     Naming the Console Terminal
909
910         In various Linuxes (and possibly elsewhere) there has been a practice
911         of designating the system console driver type as `console'.  Please
912         do not do this any more!  It complicates peoples' lives, because it
913         can mean that several different terminfo entries from different
914         operating systems all logically want to be called `console'.
915
916         Please pick a name unique to your console driver and set that up
917         in the /etc/inittab table or local equivalent.  Send the entry to the
918         terminfo maintainer (listed in the misc/terminfo file) to be included
919         in the terminfo file, if it's not already there.  See the
920         term(7) manual page included with this distribution for more on
921         conventions for choosing type names.
922
923         Here are some recommended primary console names:
924
925                 linux   -- Linux console driver
926                 freebsd -- FreeBSD
927                 netbsd  -- NetBSD
928                 bsdos   -- BSD/OS
929
930         If you are responsible for integrating ncurses for one of these
931         distribution, please either use the recommended name or get back
932         to us explaining why you don't want to, so we can work out nomenclature
933         that will make users' lives easier rather than harder.
934
935
936 RECENT XTERM VERSIONS:
937 ---------------------
938
939         The terminfo database file included with this distribution assumes you
940         are running an XFree86 xterm based on X11R6 (i.e., xterm-r6).  The
941         earlier X11R5 entry (xterm-r5) is provided as well.
942
943         If you are running XFree86 version 3.2 (actually 3.1.2F and up), you
944         should consider using the xterm-xf86-v32 (or later, the most recent
945         version is always named "xterm-xfree86") entry, which adds ANSI color
946         and the VT220 capabilities which have been added in XFree86.  If you
947         are running a mixed network, however, where this terminal description
948         may be used on an older xterm, you may have problems, since
949         applications that assume these capabilities will produce incorrect
950         output on the older xterm (e.g., highlighting is not cleared).
951
952
953 CONFIGURING FALLBACK ENTRIES:
954 ----------------------------
955
956         In order to support operation of ncurses programs before the terminfo
957         tree is accessible (that is, in single-user mode or at OS installation
958         time) the ncurses library can be compiled to include an array of
959         pre-fetched fallback entries.
960
961         These entries are checked by setupterm() only when the conventional
962         fetches from the terminfo tree and the termcap fallback (if configured)
963         have been tried and failed.  Thus, the presence of a fallback will not
964         shadow modifications to the on-disk entry for the same type, when that
965         entry is accessible.
966
967         By default, there are no entries on the fallback list.  After you
968         have built the ncurses suite for the first time, you can change
969         the list (the process needs infocmp(1)).  To do so, use the script
970         MKfallback.sh.  A configure script option --with-fallbacks does this
971         (it accepts a comma-separated list of the names you wish, and does
972         not require a rebuild).
973
974         If you wanted (say) to have linux, vt100, and xterm fallbacks, you
975         would use the commands
976
977                 cd ncurses;
978                 MKfallback.sh linux vt100 xterm >fallback.c
979
980         Then just rebuild and reinstall the library as you would normally.
981         You can restore the default empty fallback list with
982
983                 MKfallback.sh >fallback.c
984
985         The overhead for an empty fallback list is one trivial stub function.
986         Any non-empty fallback list is const-ed and therefore lives in sharable
987         text space.  You can look at the comment trailing each initializer in
988         the generated ncurses/fallback.c file to see the core cost of the
989         fallbacks.  A good rule of thumb for modern vt100-like entries is that
990         each one will cost about 2.5K of text space.
991
992
993 BSD CONVERSION NOTES:
994 --------------------
995
996         If you need to support really ancient BSD programs, you probably
997         want to configure with the --enable-bsdpad option.  What this does
998         is enable code in tputs() that recognizes a numeric prefix on a
999         capability as a request for that much trailing padding in milliseconds.
1000         There are old BSD programs that do things like tputs("50").
1001
1002         (If you are distributing ncurses as a support-library component of
1003         an application you probably want to put the remainder of this section
1004         in the package README file.)
1005
1006         The following note applies only if you have configured ncurses with
1007         --enable-termcap.
1008
1009 ------------------------------- CUT HERE --------------------------------
1010
1011 If you are installing this application privately (either because you
1012 have no root access or want to experiment with it before doing a root
1013 installation), there are a couple of details you need to be aware of.
1014 They have to do with the ncurses library, which uses terminfo rather
1015 than termcap for describing terminal characteristics.
1016
1017 Though the ncurses library is terminfo-based, it will interpret your
1018 TERMCAP variable (if present), any local termcap files you reference
1019 through it, and the system termcap file.  However, in order to avoid
1020 slowing down your application startup, it will only do this once per
1021 terminal type!
1022
1023 The first time you load a given terminal type from your termcap
1024 database, the library initialization code will automatically write it
1025 in terminfo format to a subdirectory under $HOME/.terminfo.  After
1026 that, the initialization code will find it there and do a (much
1027 faster) terminfo fetch.
1028
1029 Usually, all this means is that your home directory will silently grow
1030 an invisible .terminfo subdirectory which will get filled in with
1031 terminfo descriptions of terminal types as you invoke them.  If anyone
1032 ever installs a global terminfo tree on your system, this will quietly
1033 stop happening and your $HOME/.terminfo will become redundant.
1034
1035 The objective of all this logic is to make converting from BSD termcap
1036 as painless as possible without slowing down your application (termcap
1037 compilation is expensive).
1038
1039 If you don't have a TERMCAP variable or custom personal termcap file,
1040 you can skip the rest of this dissertation.
1041
1042 If you *do* have a TERMCAP variable and/or a custom personal termcap file
1043 that defines a terminal type, that definition will stop being visible
1044 to this application after the first time you run it, because it will
1045 instead see the terminfo entry that it wrote to $HOME/terminfo the
1046 first time around.
1047
1048 Subsequently, editing the TERMCAP variable or personal TERMCAP file
1049 will have no effect unless you explicitly remove the terminfo entry
1050 under $HOME/terminfo.  If you do that, the entry will be recompiled
1051 from your termcap resources the next time it is invoked.
1052
1053 To avoid these complications, use infocmp(1) and tic(1) to edit the
1054 terminfo directory directly.
1055
1056 ------------------------------- CUT HERE --------------------------------
1057
1058 USING NCURSES WITH AFS:
1059         AFS treats each directory as a separate logical filesystem, you
1060         can't hard-link across them.  The --enable-symlinks option copes
1061         with this by making tic use symbolic links.
1062
1063 USING NCURSES WITH EMACS:
1064         GNU Emacs has its own termcap support.  By default, it uses a mixture
1065         of those functions and code linked from the host system's libraries.
1066         You need to foil this and shut out the GNU termcap library entirely.
1067
1068         In order to do this, hack the Linux config file (s/linux.h) to contain
1069         a #define TERMINFO and set the symbol LIBS_TERMCAP to "-lncurses".
1070
1071         We have submitted such a change for the 19.30 release, so it may
1072         already be applied in your sources -- check for the #define TERMINFO.
1073
1074 USING NCURSES WITH GPM:
1075         Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
1076         which is used on Linux console.  Be aware that GPM is commonly
1077         installed as a shared library which contains a wrapper for the curses
1078         wgetch() function (libcurses.o).  Some integrators have simplified
1079         linking applications by combining all or part of libcurses.so (the BSD
1080         curses) into the libgpm.so file, producing symbol conflicts with
1081         ncurses (specifically the wgetch function).  You may be able to work
1082         around this problem by linking as follows:
1083
1084                 cc -o foo foo.o -lncurses -lgpm -lncurses
1085
1086         but the linker may not cooperate, producing mysterious errors.
1087         A patched version of gpm is available:
1088
1089                 dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz
1090
1091         This patch is incorporated in gpm 1.12; however some integrators
1092         are slow to update this library.  Current distributions of gpm can
1093         be configured properly using the --without-curses option.
1094
1095 BUILDING NCURSES WITH A CROSS-COMPILER
1096         Ncurses can be built with a cross-compiler.  Some parts must be built
1097         with the host's compiler since they are used for building programs
1098         (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
1099         that are compiled into the ncurses library.  You should set the
1100         BUILD_CC environment variable to your host's compiler, and run the
1101         configure script configuring for the cross-compiler.
1102
1103         Note that all of the generated source-files which are part of ncurses
1104         will be made if you use
1105
1106                 make sources
1107
1108         This would be useful in porting to an environment which has little
1109         support for the tools used to generate the sources, e.g., sed, awk and
1110         Bourne-shell.
1111
1112 BUGS:
1113         Send any feedback to the ncurses mailing list at
1114         bug-ncurses@gnu.org. To subscribe send mail to
1115         bug-ncurses-request@gnu.org with body that reads:
1116         subscribe ncurses <your-email-address-here>
1117
1118         The Hacker's Guide in the doc directory includes some guidelines
1119         on how to report bugs in ways that will get them fixed most quickly.