INSTALL revision 97049
197049Speter-- $Id: INSTALL,v 1.52 2002/01/12 22:56:44 tom Exp $
250276Speter---------------------------------------------------------------------
350276Speter             How to install Ncurses/Terminfo on your system
450276Speter---------------------------------------------------------------------
562449Speter
650276Speter    ************************************************************
750276Speter    * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
850276Speter    ************************************************************
950276Speter
1050276SpeterYou should be reading the file INSTALL in a directory called ncurses-d.d, where
1150276Speterd.d is the current version number.  There should be several subdirectories,
1250276Speterincluding `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
1350276Speterand `test'.  See the README file for a roadmap to the package.
1450276Speter
1550276SpeterIf you are a Linux or FreeBSD or NetBSD distribution integrator or packager,
1650276Speterplease read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR
1750276Speterbelow.
1850276Speter
1950276SpeterIf you are converting from BSD curses and do not have root access, be sure
2050276Speterto read the BSD CONVERSION NOTES section below.
2150276Speter
2250276SpeterIf you are using a version of XFree86 xterm older than 3.1.2F, see the section
2350276Speteron RECENT XTERM VERSIONS below.
2450276Speter
2550276SpeterIf you are trying to build GNU Emacs using ncurses for terminal support,
2650276Speterread the USING NCURSES WITH EMACS section below.
2750276Speter
2850276SpeterIf you are trying to build applications using gpm with ncurses,
2950276Speterread the USING NCURSES WITH GPM section below.
3050276Speter
3150276SpeterIf you are running over the Andrew File System see the note below on
3250276SpeterUSING NCURSES WITH AFS.
3350276Speter
3466963SpeterIf you are cross-compiling, see the note below on BUILDING NCURSES WITH A
3566963SpeterCROSS-COMPILER.
3666963Speter
3750276SpeterIf you want to build the Ada95 binding, go to the Ada95 directory and
3850276Speterfollow the instructions there.  The Ada95 binding is not covered below.
3950276Speter
4050276SpeterIf you are using anything but (a) Linux, or (b) one of the 4.4BSD-based
4150276Speteri386 Unixes, go read the Portability section in the TO-DO file before you
4250276Speterdo anything else.
4350276Speter
4462449Speter
4550276SpeterREQUIREMENTS:
4662449Speter------------
4750276Speter
4850276SpeterYou will need the following in order to build and install ncurses under UNIX:
4950276Speter
5050276Speter	* ANSI C compiler  (gcc is recommended)
5150276Speter	* sh               (bash will do)
5250276Speter	* awk              (mawk or gawk will do)
5350276Speter	* sed
5450276Speter	* BSD or System V style install (a script is enclosed)
5550276Speter
5650276SpeterNcurses has been also built in the OS/2 EMX environment.
5750276Speter
5862449Speter
5950276SpeterINSTALLATION PROCEDURE:
6062449Speter----------------------
6150276Speter
6250276Speter1.  First, decide whether you want ncurses to replace your existing library (in
6350276Speter    which case you'll need super-user privileges) or be installed in parallel
6450276Speter    with it.
6550276Speter
6650276Speter    The --prefix option to configure changes the root directory for installing
6750276Speter    ncurses.  The default is in subdirectories of /usr/local.  Use
6850276Speter    --prefix=/usr to replace your default curses distribution.  This is the
6950276Speter    default for Linux and BSD/OS users.
7050276Speter
7150276Speter    The package gets installed beneath the --prefix directory as follows:
7250276Speter
7350276Speter    In $(prefix)/bin:          tic, infocmp, captoinfo, tset,
7466963Speter				reset, clear, tput, toe
7550276Speter    In $(prefix)/lib:          libncurses*.* libcurses.a
7650276Speter    In $(prefix)/share/terminfo: compiled terminal descriptions
7750276Speter    In $(prefix)/include:      C header files
7850276Speter    Under $(prefix)/man:       the manual pages
7950276Speter
8050276Speter    Note however that the configure script attempts to locate previous
8150276Speter    installation of ncurses, and will set the default prefix according to where
8250276Speter    it finds the ncurses headers.
8350276Speter
8450276Speter2.  Type `./configure' in the top-level directory of the distribution to
8550276Speter    configure ncurses for your operating system and create the Makefiles.
8650276Speter    Besides --prefix, various configuration options are available to customize
8750276Speter    the installation; use `./configure --help' to list the available options.
8850276Speter
8950276Speter    If your operating system is not supported, read the PORTABILITY section in
9050276Speter    the file ncurses/README for information on how to create a configuration
9150276Speter    file for your system.
9250276Speter
9350276Speter    The `configure' script generates makefile rules for one or more object
9450276Speter    models and their associated libraries:
9550276Speter
9650276Speter	libncurses.a (normal)
9750276Speter
9850276Speter	libcurses.a (normal, a link to libncurses.a)
9950276Speter		This gets left out if you configure with --disable-overwrite.
10050276Speter
10150276Speter	libncurses.so (shared)
10250276Speter
10350276Speter	libncurses_g.a (debug)
10450276Speter
10550276Speter	libncurses_p.a (profile)
10650276Speter
10776726Speter	libncurses.la (libtool)
10876726Speter
10950276Speter    If you do not specify any models, the normal and debug libraries will be
11050276Speter    configured.  Typing `configure' with no arguments is equivalent to:
11150276Speter
11266963Speter	./configure --with-normal --with-debug --enable-overwrite
11350276Speter
11450276Speter    Typing
11550276Speter
11666963Speter	./configure --with-shared
11750276Speter
11850276Speter    makes the shared libraries the default, resulting in
11950276Speter
12066963Speter	./configure --with-shared --with-normal --with-debug --enable-overwrite
12150276Speter
12250276Speter    If you want only shared libraries, type
12350276Speter
12466963Speter	./configure --with-shared --without-normal --without-debug
12550276Speter
12650276Speter    Rules for generating shared libraries are highly dependent upon the choice
12750276Speter    of host system and compiler.  We've been testing shared libraries on Linux
12850276Speter    and SunOS with gcc, but more work needs to be done to make shared libraries
12950276Speter    work on other systems.
13050276Speter
13176726Speter    If you have libtool installed, you can type
13276726Speter
13376726Speter	./configure --with-libtool
13476726Speter
13576726Speter    to generate the appropriate static and/or shared libraries for your
13676726Speter    platform using libtool.
13776726Speter
13850276Speter    You can make curses and terminfo fall back to an existing file of termcap
13950276Speter    definitions by configuring with --enable-termcap.  If you do this, the
14050276Speter    library will search /etc/termcap before the terminfo database, and will
14150276Speter    also interpret the contents of the TERM environment variable.  See the
14250276Speter    section BSD CONVERSION NOTES below.
14350276Speter
14450276Speter3.  Type `make'.  Ignore any warnings, no error messages should be produced.
14550276Speter    This should compile the ncurses library, the terminfo compiler tic(1),
14650276Speter    captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
14766963Speter    programs (see the manual pages for explanation of what they do), some test
14850276Speter    programs, and the panels, menus, and forms libraries.
14950276Speter
15050276Speter4.  Run ncurses and several other test programs in the test directory to
15150276Speter    verify that ncurses functions correctly before doing an install that
15250276Speter    may overwrite system files.  Read the file test/README for details on
15350276Speter    the test programs.
15462449Speter
15550276Speter    NOTE: You must have installed the terminfo database, or set the
15650276Speter    environment variable $TERMINFO to point to a SVr4-compatible terminfo
15750276Speter    database before running the test programs.  Not all vendors' terminfo
15850276Speter    databases are SVr4-compatible, but most seem to be.  Exceptions include
15950276Speter    DEC's Digital Unix (formerly known as OSF/1).
16050276Speter
16150276Speter    The ncurses program is designed specifically to test the ncurses library.
16250276Speter    You can use it to verify that the screen highlights work correctly, that
16350276Speter    cursor addressing and window scrolling works OK, etc.
16450276Speter
16550276Speter5.  Once you've tested, you can type `make install' to install libraries,
16666963Speter    the programs, the terminfo database and the manual pages.  Alternately, you
16750276Speter    can type `make install' in each directory you want to install.  In the
16850276Speter    top-level directory, you can do a partial install using these commands:
16950276Speter
17050276Speter	'make install.progs'    installs tic, infocmp, etc...
17166963Speter	'make install.includes' installs the headers.
17266963Speter	'make install.libs'     installs the libraries (and the headers).
17366963Speter	'make install.data'     installs the terminfo data. (Note: `tic' must
17466963Speter				be installed before the terminfo data can be
17566963Speter				compiled).
17666963Speter	'make install.man'      installs the manual pages.
17750276Speter
17850276Speter  ############################################################################
17950276Speter  #     CAVEAT EMPTOR: `install.data' run as root will NUKE any existing     #
18050276Speter  #  terminfo database. If you have any custom or unusual entries SAVE them  #
18150276Speter  #  before you install ncurses.  I have a file called terminfo.custom for   #
18250276Speter  #  this purpose.  Don't forget to run tic on the file once you're done.    #
18350276Speter  ############################################################################
18450276Speter
18566963Speter    The terminfo(5) manual page must be preprocessed with tbl(1) before
18650276Speter    being formatted by nroff(1).  Modern man(1) implementations tend to do
18766963Speter    this by default, but you may want to look at your version's manual page
18876726Speter    to be sure.  You may also install the manual pages after preprocessing
18976726Speter    with tbl(1) by specifying the configure option --with-manpage-tbl.
19050276Speter
19150276Speter    If the system already has a curses library that you need to keep using
19250276Speter    for some bizarre binary-compatibility reason, you'll need to distinguish
19350276Speter    between it and ncurses. If ncurses is installed outside the standard
19450276Speter    directories (/usr/include and /usr/lib) then all your users will need
19550276Speter    to use the -I option to compile programs and -L to link them.
19650276Speter
19750276Speter    If you have BSD curses installed in your system and you accidentally
19850276Speter    compile using its curses.h you'll end up with a large number of
19950276Speter    undefined symbols at link time. _waddbytes is one of them.
20050276Speter
20150276Speter    IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
20250276Speter    and run the `capconvert' script.  This script will deduce various things
20350276Speter    about your environment and use them to build you a private terminfo tree,
20450276Speter    so you can use ncurses applications.
20550276Speter
20650276Speter    If more than one user at your site does this, the space for the duplicate
20750276Speter    trees is wasted.  Try to get your site administrators to install a system-
20850276Speter    wide terminfo tree instead.
20950276Speter
21050276Speter    See the BSD CONVERSION NOTES section below for a few more details.
21150276Speter
21250276Speter6.  The c++ directory has C++ classes that are built on top of ncurses and
21356639Speter    panels.  You must have c++ (and its libraries) installed before you can
21450276Speter    compile and run the demo.
21550276Speter
21656639Speter    Use --without-cxx-binding to tell configure to not build the C++ bindings
21756639Speter    and demo.
21856639Speter
21950276Speter    If you do not have C++, you must use the --without-cxx option to tell
22056639Speter    the configure script to not attempt to determine the type of 'bool'
22156639Speter    which may be supported by C++.  IF YOU USE THIS OPTION, BE ADVISED THAT
22256639Speter    YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++.
22362449Speter
22450276Speter7.  If you're running an older Linux, you must either (a) tell Linux that the
22550276Speter    console terminal type is `linux' or (b) make a link to or copy of the
22650276Speter    linux entry in the appropriate place under your terminfo directory, named
22750276Speter    `console'.  All 1.3 and many 1.2 distributions (including Yggdrasil and
22850276Speter    Red Hat) already have the console type set to `linux'.
22950276Speter
23050276Speter    The way to change the wired-in console type depends on the configuration
23150276Speter    of your system. This may involve editing /etc/inittab, /etc/ttytype,
23250276Speter    /etc/profile and other such files.
23350276Speter
23450276Speter    Warning: this is not for the fainthearted, if you mess up your console
23550276Speter    getty entries you can make your system unusable!  However, if you are
23650276Speter    a distribution maker, this is the right thing to do (see the note for
23750276Speter    integrators near the end of this file).
23850276Speter
23950276Speter    The easier way is to link or copy l/linux to c/console under your terminfo
24050276Speter    directory.  Note: this will go away next time you do `make install.data'
24150276Speter    and you'll have to redo it. There is no need to have entries for all
24250276Speter    possible screen sizes, ncurses will figure out the size automatically.
24350276Speter
24462449Speter
24566963SpeterSUMMARY OF CONFIGURE OPTIONS:
24666963Speter----------------------------
24766963Speter
24866963Speter    The configure script provides a short list of its options when you type
24966963Speter
25066963Speter	./configure --help
25166963Speter
25266963Speter    The --help and several options are common to all configure scripts that are
25366963Speter    generated with autoconf.  Those are all listed before the line
25466963Speter
25566963Speter	--enable and --with options recognized:
25666963Speter
25766963Speter    The other options are specific to this package.  We list them in alphabetic
25866963Speter    order.
25966963Speter
26066963Speter    --disable-assumed-color
26166963Speter	With ncurses 5.1, we introduced a new function, assume_default_colors()
26266963Speter	which allows applications to specify what the default foreground and
26366963Speter	background color are assumed to be.  Most color applications use
26466963Speter	full-screen color; but a few do not color the background.  While the
26566963Speter	assumed values can be overridden by invoking assume_default_colors(),
26666963Speter	you may find it useful to set the assumed values to the pre-5.1
26766963Speter	convention, using this configure option.
26866963Speter
26966963Speter    --disable-big-core
27066963Speter	Assume machine has little memory.  The configure script attempts to
27166963Speter	determine if your machine has enough memory (about 6Mb) to compile the
27266963Speter	terminfo database without writing portions to disk.  Some allocators
27366963Speter	return deceptive results, so you may have to override the configure
27466963Speter	script.  Or you may be building tic for a smaller machine.
27566963Speter
27666963Speter    --disable-database
27766963Speter	Use only built-in data.  The ncurses libraries normally read terminfo
27866963Speter	and termcap data from disk.  You can configure ncurses to have a
27966963Speter	built-in database, aka "fallback" entries.  Embedded applications may
28097049Speter	have no need for an external database.  Some, but not all of the
28197049Speter	programs are useful in this configuration, e.g., reset and tput versus
28297049Speter	infocmp and tic.
28366963Speter
28466963Speter    --disable-ext-funcs
28566963Speter	Disable function-extensions.  Configure ncurses without the functions
28666963Speter	that are not specified by XSI.  See ncurses/modules for the exact
28766963Speter	list of library modules that would be suppressed.
28866963Speter
28966963Speter    --disable-hashmap
29066963Speter	Compile without hashmap scrolling-optimization code.  This algorithm is
29166963Speter	the default.
29266963Speter
29366963Speter    --disable-leaks
29466963Speter	For testing, compile-in code that frees memory that normally would not
29566963Speter	be freed, to simplify analysis of memory-leaks.
29666963Speter
29766963Speter    --disable-macros
29866963Speter	For testing, use functions rather than macros.  The program will run
29966963Speter	more slowly, but it is simpler to debug.  This makes a header file
30066963Speter	"nomacros.h".  See also the --enable-expanded option.
30166963Speter
30266963Speter    --disable-overwrite
30366963Speter	If you are installing ncurses on a system which contains another
30466963Speter	development version of curses, or which could be confused by the loader
30566963Speter	for another version, we recommend that you leave out the link to
30666963Speter	-lcurses.  The ncurses library is always available as -lncurses.
30766963Speter	Disabling overwrite also causes the ncurses header files to be
30866963Speter	installed into a subdirectory, e.g., /usr/local/include/ncurses,
30966963Speter	rather than the include directory.  This makes it simpler to avoid
31066963Speter	compile-time conflicts with other versions of curses.h
31166963Speter
31266963Speter    --disable-root-environ
31366963Speter	Compile with environment restriction, so certain environment variables
31466963Speter	are not available when running as root, or via a setuid/setgid
31566963Speter	application.  These are (for example $TERMINFO) those that allow the
31666963Speter	search path for the terminfo or termcap entry to be customized.
31766963Speter
31866963Speter    --disable-scroll-hints
31966963Speter	Compile without scroll-hints code.  This option is ignored when
32066963Speter	hashmap scrolling is configured, which is the default.
32166963Speter
32266963Speter    --enable-add-ons=DIR...
32366963Speter	This is used to check if this package is a glibc add-on.  This is used
32466963Speter	only by the glibc makefiles.
32566963Speter
32666963Speter    --enable-assertions
32766963Speter	For testing, compile-in assertion code.  This is used only for a few
32866963Speter	places where ncurses cannot easily recover by returning an error code.
32966963Speter
33066963Speter    --enable-broken_linker
33166963Speter	A few platforms have what we consider a broken linker:  it cannot link
33266963Speter	objects from an archive solely by referring to data objects in those
33366963Speter	files, but requires a function reference.  This configure option
33466963Speter	changes several data references to functions to work around this
33566963Speter	problem.
33666963Speter
33766963Speter	NOTE:  With ncurses 5.1, this may not be necessary, since we are
33866963Speter	told that some linkers interpret uninitialized global data as a
33966963Speter	different type of reference which behaves as described above.  We have
34066963Speter	explicitly initialized all of the global data to work around the
34166963Speter	problem.
34266963Speter
34366963Speter    --enable-bsdpad
34466963Speter	Recognize BSD-style prefix padding.  Some ancient BSD programs (such as
34566963Speter	nethack) call tputs("50") to implement delays.
34666963Speter
34766963Speter    --enable-colorfgbg
34866963Speter	Compile with experimental $COLORFGBG code.  That environment variable
34966963Speter	is set by some terminal emulators as a hint to applications, by
35066963Speter	advertising the default foreground and background colors.  During
35166963Speter	initialization, ncurses sets color pair 0 to match this.
35266963Speter
35366963Speter    --enable-const
35466963Speter	The curses interface as documented in XSI is rather old, in fact
35566963Speter	including features that precede ANSI C.  The prototypes generally do
35666963Speter	not make effective use of "const".  When using stricter compilers (or
35766963Speter	gcc with appropriate warnings), you may see warnings about the mismatch
35866963Speter	between const and non-const data.  We provide a configure option which
35966963Speter	changes the interfaces to use const - quieting these warnings and
36066963Speter	reflecting the actual use of the parameters more closely.  The ncurses
36166963Speter	library uses the symbol NCURSES_CONST for these instances of const,
36266963Speter	and if you have asked for compiler warnings, will add gcc's const-qual
36366963Speter	warning.  There will still be warnings due to subtle inconsistencies
36466963Speter	in the interface, but at a lower level.
36566963Speter
36666963Speter	NOTE:  configuring ncurses with this option may detract from the
36766963Speter	portability of your applications by encouraging you to use const in
36866963Speter	places where the XSI curses interface would not allow them.  Similar
36966963Speter	issues arise when porting to SVr4 curses, which uses const in even
37066963Speter	fewer places.
37166963Speter
37266963Speter    --enable-echo
37366963Speter	Use the option --disable-echo to make the build-log less verbose by
37466963Speter	suppressing the display of the compile and link commands.  This makes
37566963Speter	it easier to see the compiler warnings.  (You can always use "make -n"
37666963Speter	to see the options that are used).
37766963Speter
37866963Speter    --enable-expanded
37966963Speter	For testing, generate functions for certain macros to make them visible
38066963Speter	as such to the debugger.  See also the --disable-macros option.
38166963Speter
38266963Speter    --enable-getcap
38366963Speter	Use the 4.4BSD getcap code if available, or a bundled version of it to
38466963Speter	fetch termcap entries.  Entries read in this way cannot use (make
38566963Speter	cross-references to) the terminfo tree, but it is faster than reading
38666963Speter	/etc/termcap.
38766963Speter
38866963Speter    --enable-getcap-cache
38966963Speter	Cache translated termcaps under the directory $HOME/.terminfo
39066963Speter
39166963Speter	NOTE:  this sounds good - it makes ncurses run faster the second time. 
39266963Speter	But look where the data comes from - an /etc/termcap containing lots of
39366963Speter	entries that are not up to date.  If you configure with this option and
39466963Speter	forget to install the terminfo database before running an ncurses
39566963Speter	application, you will end up with a hidden terminfo database that
39666963Speter	generally does not support color and will miss some function keys.
39766963Speter
39866963Speter    --enable-hard-tabs
39966963Speter	Compile-in cursor-optimization code that uses hard-tabs.  We would make
40066963Speter	this a standard feature except for the concern that the terminfo entry
40166963Speter	may not be accurate, or that your stty settings have disabled the use
40266963Speter	of tabs.
40366963Speter
40466963Speter    --enable-no-padding
40566963Speter	Compile-in support for the $NCURSES_NO_PADDING environment variable,
40666963Speter	which allows you to suppress the effect of non-mandatory padding in
40766963Speter	terminfo entries.  This is the default, unless you have disabled the
40866963Speter	extended functions.
40966963Speter
41066963Speter    --enable-rpath
41166963Speter	Use rpath option when generating shared libraries, and with some
41266963Speter	restrictions when linking the corresponding programs.  This applies
41366963Speter	mainly to systems using the GNU linker (read the manpage).
41466963Speter
41566963Speter    --enable-safe-sprintf
41666963Speter	Compile with experimental safe-sprintf code.  You may consider using
41766963Speter	this if you are building ncurses for a system that has neither
41866963Speter	vsnprintf() or vsprintf().  It is slow, however.
41966963Speter
42066963Speter    --enable-sigwinch
42166963Speter	Compile support for ncurses' SIGWINCH handler.  If your application has
42266963Speter	its own SIGWINCH handler, ncurses will not use its own.  The ncurses
42366963Speter	handler causes wgetch() to return KEY_RESIZE when the screen-size
42466963Speter	changes.  This option is the default, unless you have disabled the
42566963Speter	extended functions.
42666963Speter
42766963Speter    --enable-symlinks
42866963Speter	If your system supports symbolic links, make tic use symbolic links
42966963Speter	rather than hard links to save diskspace when writing aliases in the
43066963Speter	terminfo database.
43166963Speter
43266963Speter    --enable-tcap-names
43366963Speter	Compile-in support for user-definable terminal capabilities.  Use the
43466963Speter	-x option of tic and infocmp to treat unrecognized terminal
43566963Speter	capabilities as user-defined strings.  This option is the default,
43666963Speter	unless you have disabled the extended functions.
43766963Speter
43866963Speter    --enable-termcap
43966963Speter	Compile in support for reading terminal descriptions from termcap if no
44066963Speter	match is found in the terminfo database.  See also the --enable-getcap
44166963Speter	and --enable-getcap-cache options.
44266963Speter
44366963Speter    --enable-warnings
44466963Speter	Turn on GCC compiler warnings.  There should be only a few.
44566963Speter
44666963Speter    --enable-widec
44766963Speter	Compile with experimental wide-character code.  This makes a different
44866963Speter	version of the libraries (e.g., libncursesw.so), which stores
44966963Speter	characters in 16-bits.  We provide a simple UTF-8 driver and test
45066963Speter	program to use this feature with terminals that can display UTF-8.
45166963Speter
45266963Speter	NOTE: applications compiled with this configuration are not compatible
45366963Speter	with those built for 8-bit characters.  You cannot simply make a
45466963Speter	symbolic link to equate libncurses.so with libncursesw.so
45566963Speter
45666963Speter    --enable-xmc-glitch
45766963Speter	Compile-in support experimental xmc (magic cookie) code.
45866963Speter
45966963Speter    --with-ada-compiler=CMD
46066963Speter	Specify the Ada95 compiler command (default "gnatmake")
46166963Speter
46266963Speter    --with-ada-include=DIR
46366963Speter	Tell where to install the Ada includes (default: 
46466963Speter	PREFIX/lib/ada/adainclude)
46566963Speter
46666963Speter    --with-ada-objects=DIR
46766963Speter	Tell where to install the Ada objects (default:  PREFIX/lib/ada/adalib)
46866963Speter
46997049Speter    --with-bool=TYPE
47097049Speter	If --without-cxx is specified, override the type used for the "bool"
47197049Speter	declared in curses.h (normally the type is automatically chosen to
47297049Speter	correspond with that in <stdbool.h>, or defaults to platform-specific
47397049Speter	sizes).
47497049Speter
47597049Speter    --with-build-cc=XXX
47697049Speter	If cross-compiling, specify a host C compiler, which is needed to
47797049Speter	compile a few utilties which generate source modules for ncurses.
47897049Speter	If you do not give this option, the configure script checks if the
47997049Speter	$BUILD_CC variable is set, and otherwise defaults to gcc or cc.
48097049Speter
48197049Speter    --with-build-cflags=XXX
48297049Speter	If cross-compiling, specify the host C compiler-flags.  You might need
48397049Speter	to do this if the target compiler has unusual flags which confuse the
48497049Speter	host compiler.
48597049Speter
48697049Speter    --with-build-ldflags=XXX
48797049Speter	If cross-compiling, specify the host linker-flags.  You might need to
48897049Speter	do this if the target linker has unusual flags which confuse the host
48997049Speter	compiler.
49097049Speter
49197049Speter    --with-build-libs=XXX
49297049Speter	If cross-compiling, the host libraries.  You might need to do this if
49397049Speter	the target environment requires unusual libraries.
49497049Speter
49597049Speter    --with-caps=XXX
49697049Speter	Specify an alternate terminfo capabilities file, which makes the
49797049Speter	configure script look for "include/Caps.XXX".  A few systems, e.g.,
49897049Speter	AIX 4.x use the same overall file-format as ncurses for terminfo
49997049Speter	data, but use different alignments within the tables to support
50097049Speter	legacy applications.  For those systems, you can configure ncurses
50197049Speter	to use a terminfo database which is compatible with the native
50297049Speter	applications.
50397049Speter
50466963Speter    --with-database=XXX
50566963Speter	Specify the terminfo source file to install.  Usually you will wish
50666963Speter	to install ncurses' default (misc/terminfo.src).  Certain systems
50766963Speter	have special requirements, e.g, OS/2 EMX has a customized terminfo
50866963Speter	source file.
50966963Speter
51066963Speter    --with-dbmalloc
51166963Speter	For testing, compile and link with Conor Cahill's dbmalloc library.
51266963Speter
51366963Speter    --with-debug
51466963Speter	Generate debug-libraries (default).  These are named by adding "_g"
51566963Speter	to the root, e.g., libncurses_g.a
51666963Speter
51766963Speter    --with-default-terminfo-dir=XXX
51866963Speter	Specify the default terminfo database directory.  This is normally
51966963Speter	DATADIR/terminfo, e.g., /usr/share/terminfo.
52066963Speter
52166963Speter    --with-develop
52266963Speter	Enable experimental/development options.  This does not count those
52366963Speter	that change the interface, such as --enable-widec.
52466963Speter
52566963Speter    --with-dmalloc
52666963Speter	For testing, compile and link with Gray Watson's dmalloc library.
52766963Speter
52866963Speter    --with-fallbacks=XXX
52966963Speter	Specify a list of fallback terminal descriptions which will be
53066963Speter	compiled into the ncurses library.  See CONFIGURING FALLBACK ENTRIES.
53166963Speter
53266963Speter    --with-gpm
53366963Speter	use Alessandro Rubini's GPM library to provide mouse support on the
53466963Speter	Linux console.
53566963Speter
53666963Speter    --with-install-prefix=XXX
53766963Speter	Allows you to specify an alternate location for installing ncurses
53866963Speter	after building it.  The value you specify is prepended to the "real"
53966963Speter	install location.  This simplifies making binary packages.
54066963Speter
54166963Speter	NOTE:  a few systems build shared libraries with fixed pathnames; this
54266963Speter	option probably will not work for those configurations.
54366963Speter
54476726Speter     --with-libtool
54576726Speter	Generate libraries with libtool.  If this option is selected, then
54676726Speter	it overrides all other library model specifications.
54776726Speter
54866963Speter    --with-manpage-format=XXX
54966963Speter	Tell the configure script how you would like to install man-pages.  The
55066963Speter	option value must be one of these:  gzip, compress, BSDI, normal,
55166963Speter	formatted.  If you do not give this option, the configure script
55266963Speter	attempts to determine which is the case.
55366963Speter
55466963Speter    --with-manpage-renames=XXX
55566963Speter	Tell the configure script that you wish to rename the manpages while
55666963Speter	installing.  Currently the only distribution which does this is
55766963Speter	the Linux Debian.  The option value specifies the name of a file
55866963Speter	that lists the renamed files, e.g., $srcdir/man/man_db.renames
55966963Speter
56066963Speter    --with-manpage-symlinks
56166963Speter	Tell the configure script that you wish to make symbolic links in the
56266963Speter	man-directory for aliases to the man-pages.  This is the default, but
56366963Speter	can be disabled for systems that provide this automatically.  Doing
56466963Speter	this on systems that do not support symbolic links will result in
56566963Speter	copying the man-page for each alias.
56666963Speter
56776726Speter    --with-manpage-tbl
56876726Speter	Tell the configure script that you with to preprocess the manpages
56976726Speter	by running them through tbl to generate tables understandable by
57076726Speter	nroff.
57176726Speter
57276726Speter    --with-ospeed=TYPE
57376726Speter	Override type of ospeed variable, which is part of the termcap
57476726Speter	compatibility interface.  In termcap, this is a 'short', which works
57576726Speter	for a wide range of baudrates because ospeed is not the actual speed
57676726Speter	but the encoded value, e.g., B9600 would be a small number such as 13. 
57776726Speter	However the encoding scheme originally allowed for values "only" up to
57876726Speter	38400bd.  A newer set of definitions past 38400bd is not encoded as
57976726Speter	compactly, and is not guaranteed to fit into a short (see the function
58076726Speter	cfgetospeed(), which returns a speed_t for this reason).  In practice,
58176726Speter	applications that required knowledge of the ospeed variable, i.e.,
58276726Speter	those using termcap, do not use the higher speeds.  Your application
58376726Speter	(or system, in general) may or may not.
58476726Speter
58566963Speter    --with-normal
58666963Speter	Generate normal (i.e., static) libraries (default).
58766963Speter
58866963Speter    --with-profile
58966963Speter	Generate profile-libraries These are named by adding "_p" to the root,
59066963Speter	e.g., libncurses_p.a
59166963Speter
59266963Speter    --with-rcs-ids
59366963Speter	Compile-in RCS identifiers.  Most of the C files have an identifier.
59466963Speter
59566963Speter    --with-shared
59666963Speter	Generate shared-libraries.  The names given depend on the system for
59766963Speter	which you are building, typically using a ".so" suffix, along with
59866963Speter	symbolic links that refer to the release version.
59966963Speter	
60066963Speter	NOTE:  Unless you override the configure script by setting the $CFLAGS
60166963Speter	environment variable, these will not be built with the -g debugging
60266963Speter	option.
60366963Speter
60466963Speter    --with-shlib-version=XXX
60566963Speter	Specify whether to use the release or ABI version for shared libraries.
60666963Speter	This is normally chosen automatically based on the type of system
60766963Speter	which you are building on.  We use it for testing the configure script.
60866963Speter
60966963Speter    --with-system-type=XXX
61066963Speter	For testing, override the derived host system-type which is used to
61166963Speter	decide things such as the linker commands used to build shared
61266963Speter	libraries.  This is normally chosen automatically based on the type of
61366963Speter	system which you are building on.  We use it for testing the configure
61466963Speter	script.
61566963Speter
61666963Speter    --with-terminfo-dirs=XXX
61766963Speter	Specify a search-list of terminfo directories which will be compiled
61866963Speter	into the ncurses library (default: DATADIR/terminfo)
61966963Speter
62066963Speter    --with-termlib
62166963Speter	When building the ncurses library, organize this as two parts:  the
62266963Speter	curses library (libncurses) and the low-level terminfo library
62366963Speter	(libtinfo).  This is done to accommodate applications that use only
62466963Speter	the latter.  The terminfo library is about half the size of the total.
62566963Speter
62697049Speter    --with-termpath=XXX
62797049Speter	Specify a search-list of termcap files which will be compiled into the
62897049Speter	ncurses library (default:  /etc/termcap:/usr/share/misc/termcap)
62997049Speter
63066963Speter    --without-ada
63166963Speter	Suppress the configure script's check for Ada95, do not build the
63266963Speter	Ada95 binding and related demo.
63366963Speter
63476726Speter    --without-curses-h
63576726Speter	Don't install the ncurses header with the name "curses.h".  Rather,
63676726Speter	install as "ncurses.h" and modify the installed headers and manpages
63776726Speter	accordingly.
63876726Speter
63966963Speter    --without-cxx
64066963Speter	XSI curses declares "bool" as part of the interface.  C++ also declares
64166963Speter	"bool".  Neither specifies the size and type of booleans, but both
64266963Speter	insist on the same name.  We chose to accommodate this by making the
64366963Speter	configure script check for the size and type (e.g., unsigned or signed)
64466963Speter	that your C++ compiler uses for booleans.  If you do not wish to use
64566963Speter	ncurses with C++, use this option to tell the configure script to not
64666963Speter	adjust ncurses bool to match C++.
64766963Speter
64866963Speter    --without-cxx-binding
64966963Speter	Suppress the configure script's check for C++, do not build the
65066963Speter	C++ binding and related demo.
65166963Speter
65266963Speter    --without-progs
65366963Speter	Tell the configure script to suppress the build of ncurses' application
65466963Speter	programs (e.g., tic).  The test applications will still be built if you
65566963Speter	type "make", though not if you simply do "make install".
65666963Speter
65766963Speter
65862449SpeterCOMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
65962449Speter--------------------------------------------
66062449Speter
66162449Speter    Because ncurses implements the X/Open Curses Specification, its interface
66262449Speter    is fairly stable.  That does not mean the interface does not change.
66362449Speter    Changes are made to the documented interfaces when we find differences
66462449Speter    between ncurses and X/Open or implementations which they certify (such as
66562449Speter    Solaris).  We add extensions to those interfaces to solve problems not
66662449Speter    addressed by the original curses design, but those must not conflict with
66762449Speter    the X/Open documentation.
66862449Speter
66962449Speter    Here are some of the major interface changes, and related problems which
67062449Speter    you may encounter when building a system with different versions of
67162449Speter    ncurses:
67262449Speter
67376726Speter    5.2 (October 21, 2000)
67476726Speter	Interface changes:
67576726Speter
67676726Speter	+ revert termcap ospeed variable to 'short' (see discussion of the
67776726Speter	  --with-ospeed configure option).
67876726Speter
67966963Speter    5.1 (July 8, 2000)
68066963Speter	Interface changes:
68162449Speter
68266963Speter	+ made the extended terminal capabilities
68366963Speter	  (configure --enable-tcap-names) a standard feature.  This should
68466963Speter	  be transparent to applications that do not require it.
68566963Speter
68666963Speter	+ removed the trace() function and related trace support from the
68766963Speter	  production library.
68866963Speter
68966963Speter	+ modified curses.h.in, undef'ing some symbols to avoid conflict
69066963Speter	  with C++ STL.
69166963Speter
69266963Speter	Added extensions:  assume_default_colors().
69366963Speter
69466963Speter    5.0 (October 23, 1999)
69566963Speter	Interface changes:
69666963Speter
69762449Speter	+ implemented the wcolor_set() and slk_color() functions.
69862449Speter
69962449Speter	+ move macro winch to a function, to hide details of struct ldat
70062449Speter
70162449Speter	+ corrected prototypes for slk_* functions, using chtype rather than
70262449Speter	  attr_t.
70362449Speter
70462449Speter	+ the slk_attr_{set,off,on} functions need an additional void*
70562449Speter	  parameter according to XSI.
70662449Speter
70762449Speter	+ modified several prototypes to correspond with 1997 version of X/Open
70862449Speter	  Curses:  [w]attr_get(), [w]attr_set(), border_set() have different
70966963Speter	  parameters.  Some functions were renamed or misspelled:
71062449Speter	  erase_wchar(), in_wchntr(), mvin_wchntr().  Some developers have used
71162449Speter	  attr_get().
71262449Speter
71362449Speter	Added extensions:  keybound(), curses_version().
71462449Speter
71562449Speter	Terminfo database changes:
71662449Speter
71762449Speter	+ change translation for termcap 'rs' to terminfo 'rs2', which is
71862449Speter	  the documented equivalent, rather than 'rs1'.
71962449Speter
72062449Speter	The problems are subtler in recent releases.
72162449Speter
72262449Speter	a) This release provides users with the ability to define their own
72362449Speter	   terminal capability extensions, like termcap.  To accomplish this,
72462449Speter	   we redesigned the TERMTYPE struct (in term.h).  Very few
72562449Speter	   applications use this struct.  They must be recompiled to work with
72662449Speter	   the 5.0 library.
72762449Speter
72862449Speter	a) If you use the extended terminfo names (i.e., you used configure
72962449Speter	   --enable-tcap-names), the resulting terminfo database can have some
73062449Speter	   entries which are not readable by older versions of ncurses.  This
73162449Speter	   is a bug in the older versions:
73262449Speter
73362449Speter	   + the terminfo database stores booleans, numbers and strings in
73462449Speter	     arrays.  The capabilities that are listed in the arrays are
73562449Speter	     specified by X/Open.  ncurses recognizes a number of obsolete and
73662449Speter	     extended names which are stored past the end of the specified
73762449Speter	     entries.
73862449Speter
73962449Speter	   + a change to read_entry.c in 951001 made the library do an lseek()
74062449Speter	     call incorrectly skipping data which is already read from the
74162449Speter	     string array.  This happens when the number of strings in the
74262449Speter	     terminfo data file is greater than STRCOUNT, the number of
74362449Speter	     specified and obsolete or extended strings.
74462449Speter
74562449Speter	   + as part of alignment with the X/Open final specification, in the
74662449Speter	     990109 patch we added two new terminfo capabilities:
74762449Speter	     set_a_attributes and set_pglen_inch).  This makes the indices for
74862449Speter	     the obsolete and extended capabilities shift up by 2.
74962449Speter
75062449Speter	   + the last two capabilities in the obsolete/extended list are memu
75162449Speter	     and meml, which are found in most terminfo descriptions for xterm.
75262449Speter
75362449Speter	     When trying to read this terminfo entry, the spurious lseek()
75462449Speter	     causes the library to attempt to read the final portion of the
75562449Speter	     terminfo data (the text of the string capabilities) 4 characters
75662449Speter	     past its starting point, and reads 4 characters too few.  The
75762449Speter	     library rejects the data, and applications are unable to
75862449Speter	     initialize that terminal type.
75962449Speter
76062449Speter	   FIX: remove memu and meml from the xterm description.  They are
76162449Speter	   obsolete, not used by ncurses.  (It appears that the feature was
76262449Speter	   added to xterm to make it more like hpterm).
76362449Speter
76462449Speter	   This is not a problem if you do not use the -x option of tic to
76562449Speter	   create a terminfo database with extended names.  Note that the
76662449Speter	   user-defined terminal capabilities are not affected by this bug,
76762449Speter	   since they are stored in a table after the older terminfo data ends,
76862449Speter	   and are invisible to the older libraries.
76962449Speter
77062449Speter	c) Some developers did not wish to use the C++ binding, and used the
77162449Speter	   configure --without-cxx option.  This causes problems if someone
77262449Speter	   uses the ncurses library from C++ because that configure test
77362449Speter	   determines the type for C++'s bool and makes ncurses match it, since
77462449Speter	   both C++ and curses are specified to declare bool.  Calling ncurses
77562449Speter	   functions with the incorrect type for bool will cause execution
77662449Speter	   errors.  In 5.0 we added a configure option "--without-cxx-binding"
77762449Speter	   which controls whether the binding itself is built and installed.
77862449Speter
77966963Speter    4.2 (March 2, 1998)
78066963Speter	Interface changes:
78162449Speter
78262449Speter	+ correct prototype for termattrs() as per XPG4 version 2.
78362449Speter
78462449Speter	+ add placeholder prototypes for color_set(), erasewchar(),
78562449Speter	  term_attrs(), wcolor_set() as per XPG4 version 2.
78662449Speter
78762449Speter	+ add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
78862449Speter	  SVr4 headers.
78962449Speter
79062449Speter	New extensions: keyok() and define_key().
79162449Speter
79262449Speter	Terminfo database changes:
79362449Speter
79462449Speter	+ corrected definition in curses.h for ACS_LANTERN, which was 'I'
79562449Speter	  rather than 'i'.
79662449Speter
79762449Speter    4.1 (May 15, 1997)
79862449Speter
79962449Speter	We added these extensions:  use_default_colors().  Also added
80062449Speter	configure option --enable-const, to support the use of const where
80162449Speter	X/Open should have, but did not, specify.
80262449Speter
80362449Speter	The terminfo database content changed the representation of color for
80462449Speter	most entries that use ANSI colors.  SVr4 curses treats the setaf/setab
80562449Speter	and setf/setb capabilities differently, interchanging the red/blue
80662449Speter	colors in the latter.
80762449Speter
80862449Speter    4.0 (December 24, 1996)
80962449Speter
81062449Speter	We bumped to version 4.0 because the newly released dynamic loader
81162449Speter	(ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL
81262449Speter	versions were inconsistent.  At that point, ncurses ABI was 3.4 and the
81362449Speter	REL was 1.9.9g, so we made them consistent.
81462449Speter
81562449Speter    1.9.9g (December 1, 1996)
81662449Speter
81766963Speter	This fixed most of the problems with 1.9.9e, and made these interface
81862449Speter	changes:
81962449Speter
82062449Speter	+ remove tparam(), which had been provided for compatibility with
82162449Speter	  some termcap.  tparm() is standard, and does not conflict with
82262449Speter	  application's fallback for missing tparam().
82362449Speter
82462449Speter	+ turn off hardware echo in initscr().  This changes the sense of the
82562449Speter	  echo() function, which was initialized to echoing rather than
82662449Speter	  nonechoing (the latter is specified).  There were several other
82762449Speter	  corrections to the terminal I/O settings which cause applications to
82862449Speter	  behave differently.
82962449Speter
83062449Speter	+ implemented several functions (such as attr_on()) which were
83162449Speter	  available only as macros.
83262449Speter
83362449Speter	+ corrected several typos in curses.h.in (i.e., the mvXXXX macros).
83462449Speter
83562449Speter	+ corrected prototypes for delay_output(),
83662449Speter	  has_color, immedok() and idcok().
83762449Speter
83862449Speter	+ corrected misspelled getbkgd().  Some applications used the
83962449Speter	  misspelled name.
84062449Speter
84162449Speter	+ added _yoffset to WINDOW.  The size of WINDOW does not impact
84262449Speter	  applications, since they use only pointers to WINDOW structs.
84362449Speter
84462449Speter	These changes were made to the terminfo database:
84562449Speter
84662449Speter	+ removed boolean 'getm' which was available as an extended name.
84762449Speter
84862449Speter	We added these extensions: wresize(), resizeterm(), has_key() and
84962449Speter	mcprint().
85062449Speter
85162449Speter    1.9.9e (March 24, 1996)
85262449Speter
85362449Speter	not recommended (a last-minute/untested change left the forms and
85466963Speter	menus libraries unusable since they do not repaint the screen).
85562449Speter	Foreground/background colors are combined incorrectly, working properly
85662449Speter	only on a black background.  When this was released, the X/Open
85762449Speter	specification was available only in draft form.
85862449Speter
85962449Speter	Some applications (such as lxdialog) were "fixed" to work with the
86062449Speter	incorrect color scheme.
86162449Speter
86262449Speter
86350276SpeterIF YOU ARE A SYSTEM INTEGRATOR:
86462449Speter------------------------------
86550276Speter
86650276Speter    Beginning with 1.9.9, the ncurses distribution includes both a tset
86750276Speter    utility and /usr/share/tabset directory.  If you are installing ncurses,
86850276Speter    it is no longer either necessary or desirable to install tset-jv.
86950276Speter
87050276Speter    Configuration and Installation:
87150276Speter
87250276Speter	Configure with --prefix=/usr to make the install productions put
87350276Speter	libraries and headers in the correct locations (overwriting any
87450276Speter	previous curses libraries and headers).  This will put the terminfo
87550276Speter	hierarchy under /usr/share/terminfo; you may want to override this with
87650276Speter	--datadir=/usr/share/misc; terminfo and tabset are installed under the
87750276Speter	data directory.
87850276Speter
87950276Speter	Please configure the ncurses library in a pure-terminfo mode; that
88050276Speter	is, with the --disable-termcap option.   This will make the ncurses
88150276Speter	library smaller and faster. The ncurses library includes a termcap
88250276Speter	emulation that queries the terminfo database, so even applications
88350276Speter	that use raw termcap to query terminal characteristics will win
88450276Speter	(providing you recompile and relink them!).
88550276Speter
88650276Speter	If you must configure with termcap fallback enabled, you may also
88750276Speter	wish to use the --enable-getcap option.  This option speeds up
88850276Speter	termcap-based startups, at the expense of not allowing personal
88950276Speter	termcap entries to reference the terminfo tree.  See the code in
89050276Speter	ncurses/tinfo/read_termcap.c for details.
89150276Speter
89250276Speter	Note that if you have $TERMCAP set, ncurses will use that value
89350276Speter	to locate termcap data.  In particular, running from xterm will
89450276Speter	set $TERMCAP to the contents of the xterm's termcap entry.
89550276Speter	If ncurses sees that, it will not examine /etc/termcap.
89650276Speter
89750276Speter    Keyboard Mapping:
89850276Speter
89950276Speter	The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48
90050276Speter	reverse-tabulation sequence) rather than ^I.  Here are the loadkeys -d
90150276Speter	mappings that will set this up:
90250276Speter
90366963Speter		keycode	 15 = Tab	      Tab
90450276Speter			alt     keycode  15 = Meta_Tab
90550276Speter			shift	keycode  15 = F26
90650276Speter		string F26 ="\033[Z"
90750276Speter
90850276Speter    Naming the Console Terminal
90950276Speter
91050276Speter	In various Linuxes (and possibly elsewhere) there has been a practice
91150276Speter	of designating the system console driver type as `console'.  Please
91250276Speter	do not do this any more!  It complicates peoples' lives, because it
91350276Speter	can mean that several different terminfo entries from different
91450276Speter	operating systems all logically want to be called `console'.
91550276Speter
91650276Speter	Please pick a name unique to your console driver and set that up
91750276Speter	in the /etc/inittab table or local equivalent.  Send the entry to the
91850276Speter	terminfo maintainer (listed in the misc/terminfo file) to be included
91950276Speter	in the terminfo file, if it's not already there.  See the
92050276Speter	term(7) manual page included with this distribution for more on
92150276Speter	conventions for choosing type names.
92250276Speter
92350276Speter	Here are some recommended primary console names:
92450276Speter
92550276Speter		linux	-- Linux console driver
92650276Speter		freebsd	-- FreeBSD
92750276Speter		netbsd	-- NetBSD
92850276Speter		bsdos	-- BSD/OS
92950276Speter
93050276Speter	If you are responsible for integrating ncurses for one of these
93150276Speter	distribution, please either use the recommended name or get back
93250276Speter	to us explaining why you don't want to, so we can work out nomenclature
93350276Speter	that will make users' lives easier rather than harder.
93450276Speter
93562449Speter
93662449SpeterRECENT XTERM VERSIONS:
93762449Speter---------------------
93862449Speter
93950276Speter	The terminfo database file included with this distribution assumes you
94050276Speter	are running an XFree86 xterm based on X11R6 (i.e., xterm-r6).  The
94150276Speter	earlier X11R5 entry (xterm-r5) is provided as well.
94250276Speter
94350276Speter	If you are running XFree86 version 3.2 (actually 3.1.2F and up), you
94450276Speter	should consider using the xterm-xf86-v32 (or later, the most recent
94550276Speter	version is always named "xterm-xfree86") entry, which adds ANSI color
94650276Speter	and the VT220 capabilities which have been added in XFree86.  If you
94750276Speter	are running a mixed network, however, where this terminal description
94850276Speter	may be used on an older xterm, you may have problems, since
94950276Speter	applications that assume these capabilities will produce incorrect
95050276Speter	output on the older xterm (e.g., highlighting is not cleared).
95150276Speter
95262449Speter
95362449SpeterCONFIGURING FALLBACK ENTRIES:
95462449Speter----------------------------
95562449Speter
95650276Speter	In order to support operation of ncurses programs before the terminfo
95750276Speter	tree is accessible (that is, in single-user mode or at OS installation
95850276Speter	time) the ncurses library can be compiled to include an array of
95950276Speter	pre-fetched fallback entries.
96050276Speter
96150276Speter	These entries are checked by setupterm() only when the conventional
96250276Speter	fetches from the terminfo tree and the termcap fallback (if configured)
96350276Speter	have been tried and failed.  Thus, the presence of a fallback will not
96450276Speter	shadow modifications to the on-disk entry for the same type, when that
96550276Speter	entry is accessible.
96650276Speter
96750276Speter	By default, there are no entries on the fallback list.  After you
96850276Speter	have built the ncurses suite for the first time, you can change
96950276Speter	the list (the process needs infocmp(1)).  To do so, use the script
97050276Speter	MKfallback.sh.  A configure script option --with-fallbacks does this
97150276Speter	(it accepts a comma-separated list of the names you wish, and does
97250276Speter	not require a rebuild).
97350276Speter
97450276Speter	If you wanted (say) to have linux, vt100, and xterm fallbacks, you
97550276Speter	would use the commands
97650276Speter
97750276Speter		cd ncurses;
97850276Speter		MKfallback.sh linux vt100 xterm >fallback.c
97950276Speter
98050276Speter	Then just rebuild and reinstall the library as you would normally.
98150276Speter	You can restore the default empty fallback list with
98250276Speter
98350276Speter		MKfallback.sh >fallback.c
98450276Speter
98550276Speter	The overhead for an empty fallback list is one trivial stub function.
98650276Speter	Any non-empty fallback list is const-ed and therefore lives in sharable
98750276Speter	text space.  You can look at the comment trailing each initializer in
98850276Speter	the generated ncurses/fallback.c file to see the core cost of the
98950276Speter	fallbacks.  A good rule of thumb for modern vt100-like entries is that
99050276Speter	each one will cost about 2.5K of text space.
99150276Speter
99262449Speter
99350276SpeterBSD CONVERSION NOTES:
99462449Speter--------------------
99562449Speter
99650276Speter	If you need to support really ancient BSD programs, you probably
99750276Speter	want to configure with the --enable-bsdpad option.  What this does
99850276Speter	is enable code in tputs() that recognizes a numeric prefix on a
99950276Speter	capability as a request for that much trailing padding in milliseconds.
100050276Speter	There are old BSD programs that do things like tputs("50").
100150276Speter
100250276Speter	(If you are distributing ncurses as a support-library component of
100350276Speter	an application you probably want to put the remainder of this section
100450276Speter	in the package README file.)
100550276Speter
100666963Speter	The following note applies only if you have configured ncurses with
100750276Speter	--enable-termcap.
100850276Speter
100950276Speter------------------------------- CUT HERE --------------------------------
101050276Speter
101150276SpeterIf you are installing this application privately (either because you
101250276Speterhave no root access or want to experiment with it before doing a root
101350276Speterinstallation), there are a couple of details you need to be aware of.
101450276SpeterThey have to do with the ncurses library, which uses terminfo rather
101550276Speterthan termcap for describing terminal characteristics.
101650276Speter
101750276SpeterThough the ncurses library is terminfo-based, it will interpret your
101850276SpeterTERMCAP variable (if present), any local termcap files you reference
101950276Speterthrough it, and the system termcap file.  However, in order to avoid
102050276Speterslowing down your application startup, it will only do this once per
102150276Speterterminal type!
102250276Speter
102350276SpeterThe first time you load a given terminal type from your termcap
102450276Speterdatabase, the library initialization code will automatically write it
102550276Speterin terminfo format to a subdirectory under $HOME/.terminfo.  After
102650276Speterthat, the initialization code will find it there and do a (much
102750276Speterfaster) terminfo fetch.
102850276Speter
102950276SpeterUsually, all this means is that your home directory will silently grow
103050276Speteran invisible .terminfo subdirectory which will get filled in with
103150276Speterterminfo descriptions of terminal types as you invoke them.  If anyone
103250276Speterever installs a global terminfo tree on your system, this will quietly
103350276Speterstop happening and your $HOME/.terminfo will become redundant.
103450276Speter
103550276SpeterThe objective of all this logic is to make converting from BSD termcap
103650276Speteras painless as possible without slowing down your application (termcap
103750276Spetercompilation is expensive).
103850276Speter
103950276SpeterIf you don't have a TERMCAP variable or custom personal termcap file,
104050276Speteryou can skip the rest of this dissertation.
104150276Speter
104250276SpeterIf you *do* have a TERMCAP variable and/or a custom personal termcap file
104350276Speterthat defines a terminal type, that definition will stop being visible
104450276Speterto this application after the first time you run it, because it will
104550276Speterinstead see the terminfo entry that it wrote to $HOME/terminfo the
104650276Speterfirst time around.
104750276Speter
104850276SpeterSubsequently, editing the TERMCAP variable or personal TERMCAP file
104950276Speterwill have no effect unless you explicitly remove the terminfo entry
105050276Speterunder $HOME/terminfo.  If you do that, the entry will be recompiled
105150276Speterfrom your termcap resources the next time it is invoked.
105250276Speter
105350276SpeterTo avoid these complications, use infocmp(1) and tic(1) to edit the
105450276Speterterminfo directory directly.
105550276Speter
105650276Speter------------------------------- CUT HERE --------------------------------
105750276Speter
105850276SpeterUSING NCURSES WITH AFS:
105950276Speter	AFS treats each directory as a separate logical filesystem, you
106050276Speter	can't hard-link across them.  The --enable-symlinks option copes
106150276Speter	with this by making tic use symbolic links.
106250276Speter
106350276SpeterUSING NCURSES WITH EMACS:
106450276Speter	GNU Emacs has its own termcap support.  By default, it uses a mixture
106550276Speter	of those functions and code linked from the host system's libraries.
106650276Speter	You need to foil this and shut out the GNU termcap library entirely.
106750276Speter
106850276Speter	In order to do this, hack the Linux config file (s/linux.h) to contain
106950276Speter	a #define TERMINFO and set the symbol LIBS_TERMCAP to "-lncurses".
107050276Speter
107150276Speter	We have submitted such a change for the 19.30 release, so it may
107250276Speter	already be applied in your sources -- check for the #define TERMINFO.
107350276Speter
107450276SpeterUSING NCURSES WITH GPM:
107550276Speter	Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
107650276Speter	which is used on Linux console.  Be aware that GPM is commonly
107750276Speter	installed as a shared library which contains a wrapper for the curses
107850276Speter	wgetch() function (libcurses.o).  Some integrators have simplified
107966963Speter	linking applications by combining all or part of libcurses.so (the BSD
108066963Speter	curses) into the libgpm.so file, producing symbol conflicts with
108166963Speter	ncurses (specifically the wgetch function).  You may be able to work
108266963Speter	around this problem by linking as follows:
108350276Speter
108450276Speter		cc -o foo foo.o -lncurses -lgpm -lncurses
108550276Speter
108650276Speter	but the linker may not cooperate, producing mysterious errors.
108750276Speter	A patched version of gpm is available:
108850276Speter
108962449Speter		dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz
109050276Speter
109150276Speter	This patch is incorporated in gpm 1.12; however some integrators
109266963Speter	are slow to update this library.  Current distributions of gpm can
109366963Speter	be configured properly using the --without-curses option.
109450276Speter
109566963SpeterBUILDING NCURSES WITH A CROSS-COMPILER
109666963Speter	Ncurses can be built with a cross-compiler.  Some parts must be built
109766963Speter	with the host's compiler since they are used for building programs
109866963Speter	(e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
109966963Speter	that are compiled into the ncurses library.  You should set the
110066963Speter	BUILD_CC environment variable to your host's compiler, and run the
110166963Speter	configure script configuring for the cross-compiler.
110250276Speter
110366963Speter	Note that all of the generated source-files which are part of ncurses
110466963Speter	will be made if you use
110550276Speter
110666963Speter		make sources
110750276Speter
110866963Speter	This would be useful in porting to an environment which has little
110966963Speter	support for the tools used to generate the sources, e.g., sed, awk and
111066963Speter	Bourne-shell.
111166963Speter
111250276SpeterBUGS:
111350276Speter	Send any feedback to the ncurses mailing list at
111462449Speter	bug-ncurses@gnu.org. To subscribe send mail to
111562449Speter	bug-ncurses-request@gnu.org with body that reads:
111650276Speter	subscribe ncurses <your-email-address-here>
111750276Speter
111866963Speter	The Hacker's Guide in the doc directory includes some guidelines
111950276Speter	on how to report bugs in ways that will get them fixed most quickly.
1120