xref: /freebsd/contrib/ncurses/INSTALL (revision 73f0a83d68863a383fd8953972cd36eb6420ec7d)
14a1a9510SRong-En Fan-------------------------------------------------------------------------------
2*73f0a83dSXin LI-- Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.               --
34a1a9510SRong-En Fan--                                                                           --
44a1a9510SRong-En Fan-- Permission is hereby granted, free of charge, to any person obtaining a   --
54a1a9510SRong-En Fan-- copy of this software and associated documentation files (the             --
64a1a9510SRong-En Fan-- "Software"), to deal in the Software without restriction, including       --
74a1a9510SRong-En Fan-- without limitation the rights to use, copy, modify, merge, publish,       --
84a1a9510SRong-En Fan-- distribute, distribute with modifications, sublicense, and/or sell copies --
94a1a9510SRong-En Fan-- of the Software, and to permit persons to whom the Software is furnished  --
104a1a9510SRong-En Fan-- to do so, subject to the following conditions:                            --
114a1a9510SRong-En Fan--                                                                           --
124a1a9510SRong-En Fan-- The above copyright notice and this permission notice shall be included   --
134a1a9510SRong-En Fan-- in all copies or substantial portions of the Software.                    --
144a1a9510SRong-En Fan--                                                                           --
154a1a9510SRong-En Fan-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
164a1a9510SRong-En Fan-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
174a1a9510SRong-En Fan-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
184a1a9510SRong-En Fan-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
194a1a9510SRong-En Fan-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
204a1a9510SRong-En Fan-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
214a1a9510SRong-En Fan-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
224a1a9510SRong-En Fan--                                                                           --
234a1a9510SRong-En Fan-- Except as contained in this notice, the name(s) of the above copyright    --
244a1a9510SRong-En Fan-- holders shall not be used in advertising or otherwise to promote the      --
254a1a9510SRong-En Fan-- sale, use or other dealings in this Software without prior written        --
264a1a9510SRong-En Fan-- authorization.                                                            --
274a1a9510SRong-En Fan-------------------------------------------------------------------------------
28*73f0a83dSXin LI-- $Id: INSTALL,v 1.168 2013/08/03 23:15:23 tom Exp $
290e3d5408SPeter Wemm---------------------------------------------------------------------
300e3d5408SPeter Wemm             How to install Ncurses/Terminfo on your system
310e3d5408SPeter Wemm---------------------------------------------------------------------
3215589c42SPeter Wemm
330e3d5408SPeter Wemm    ************************************************************
340e3d5408SPeter Wemm    * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
350e3d5408SPeter Wemm    ************************************************************
360e3d5408SPeter Wemm
370e3d5408SPeter WemmYou should be reading the file INSTALL in a directory called ncurses-d.d, where
380e3d5408SPeter Wemmd.d is the current version number.  There should be several subdirectories,
390e3d5408SPeter Wemmincluding `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
400e3d5408SPeter Wemmand `test'.  See the README file for a roadmap to the package.
410e3d5408SPeter Wemm
4206bfebdeSXin LIIf you are a distribution integrator or packager, please read and act on the
4306bfebdeSXin LIsection titled IF YOU ARE A SYSTEM INTEGRATOR below.
440e3d5408SPeter Wemm
450e3d5408SPeter WemmIf you are converting from BSD curses and do not have root access, be sure
460e3d5408SPeter Wemmto read the BSD CONVERSION NOTES section below.
470e3d5408SPeter Wemm
480e3d5408SPeter WemmIf you are trying to build applications using gpm with ncurses,
490e3d5408SPeter Wemmread the USING NCURSES WITH GPM section below.
500e3d5408SPeter Wemm
510e3d5408SPeter WemmIf you are running over the Andrew File System see the note below on
520e3d5408SPeter WemmUSING NCURSES WITH AFS.
530e3d5408SPeter Wemm
5418259542SPeter WemmIf you are cross-compiling, see the note below on BUILDING NCURSES WITH A
5518259542SPeter WemmCROSS-COMPILER.
5618259542SPeter Wemm
570e3d5408SPeter WemmIf you want to build the Ada95 binding, go to the Ada95 directory and
580e3d5408SPeter Wemmfollow the instructions there.  The Ada95 binding is not covered below.
590e3d5408SPeter Wemm
6015589c42SPeter Wemm
610e3d5408SPeter WemmREQUIREMENTS:
6215589c42SPeter Wemm------------
630e3d5408SPeter Wemm
644a1a9510SRong-En FanYou will need the following to build and install ncurses under UNIX:
650e3d5408SPeter Wemm
664a1a9510SRong-En Fan	* ANSI C compiler  (gcc, for instance)
670e3d5408SPeter Wemm	* sh               (bash will do)
680e3d5408SPeter Wemm	* awk              (mawk or gawk will do)
690e3d5408SPeter Wemm	* sed
700e3d5408SPeter Wemm	* BSD or System V style install (a script is enclosed)
710e3d5408SPeter Wemm
720e3d5408SPeter WemmNcurses has been also built in the OS/2 EMX environment.
730e3d5408SPeter Wemm
7415589c42SPeter Wemm
750e3d5408SPeter WemmINSTALLATION PROCEDURE:
7615589c42SPeter Wemm----------------------
770e3d5408SPeter Wemm
780e3d5408SPeter Wemm1.  First, decide whether you want ncurses to replace your existing library (in
790e3d5408SPeter Wemm    which case you'll need super-user privileges) or be installed in parallel
800e3d5408SPeter Wemm    with it.
810e3d5408SPeter Wemm
820e3d5408SPeter Wemm    The --prefix option to configure changes the root directory for installing
834a1a9510SRong-En Fan    ncurses.  The default is normally in subdirectories of /usr/local, except
8406bfebdeSXin LI    for systems where ncurses is normally installed as a system library (see
8506bfebdeSXin LI    "IF YOU ARE A SYSTEM INTEGRATOR").  Use --prefix=/usr to replace your
8606bfebdeSXin LI    default curses distribution.
870e3d5408SPeter Wemm
880e3d5408SPeter Wemm    The package gets installed beneath the --prefix directory as follows:
890e3d5408SPeter Wemm
900e3d5408SPeter Wemm    In $(prefix)/bin:          tic, infocmp, captoinfo, tset,
9106bfebdeSXin LI				reset, clear, tput, toe, tabs
920e3d5408SPeter Wemm    In $(prefix)/lib:          libncurses*.* libcurses.a
930e3d5408SPeter Wemm    In $(prefix)/share/terminfo: compiled terminal descriptions
940e3d5408SPeter Wemm    In $(prefix)/include:      C header files
950e3d5408SPeter Wemm    Under $(prefix)/man:       the manual pages
960e3d5408SPeter Wemm
974a1a9510SRong-En Fan    Note that the configure script attempts to locate previous installation of
984a1a9510SRong-En Fan    ncurses, and will set the default prefix according to where it finds the
994a1a9510SRong-En Fan    ncurses headers.
1004a1a9510SRong-En Fan
1014a1a9510SRong-En Fan    Do not use commands such as
1024a1a9510SRong-En Fan
1034a1a9510SRong-En Fan	make install prefix=XXX
1044a1a9510SRong-En Fan
1054a1a9510SRong-En Fan    to change the prefix after configuration, since the prefix value is used
1064a1a9510SRong-En Fan    for some absolute pathnames such as TERMINFO.  Instead do this
1074a1a9510SRong-En Fan
1084a1a9510SRong-En Fan	make install DESTDIR=XXX
1094a1a9510SRong-En Fan
1104a1a9510SRong-En Fan    See also the discussion of --with-install-prefix.
1110e3d5408SPeter Wemm
1120e3d5408SPeter Wemm2.  Type `./configure' in the top-level directory of the distribution to
1130e3d5408SPeter Wemm    configure ncurses for your operating system and create the Makefiles.
1140e3d5408SPeter Wemm    Besides --prefix, various configuration options are available to customize
1150e3d5408SPeter Wemm    the installation; use `./configure --help' to list the available options.
1160e3d5408SPeter Wemm
1170e3d5408SPeter Wemm    If your operating system is not supported, read the PORTABILITY section in
1180e3d5408SPeter Wemm    the file ncurses/README for information on how to create a configuration
1190e3d5408SPeter Wemm    file for your system.
1200e3d5408SPeter Wemm
1210e3d5408SPeter Wemm    The `configure' script generates makefile rules for one or more object
1220e3d5408SPeter Wemm    models and their associated libraries:
1230e3d5408SPeter Wemm
1240e3d5408SPeter Wemm	libncurses.a (normal)
1250e3d5408SPeter Wemm
1260e3d5408SPeter Wemm	libcurses.a (normal, a link to libncurses.a)
1270e3d5408SPeter Wemm		This gets left out if you configure with --disable-overwrite.
1280e3d5408SPeter Wemm
1290e3d5408SPeter Wemm	libncurses.so (shared)
1300e3d5408SPeter Wemm
1310e3d5408SPeter Wemm	libncurses_g.a (debug)
1320e3d5408SPeter Wemm
1330e3d5408SPeter Wemm	libncurses_p.a (profile)
1340e3d5408SPeter Wemm
1357a69bbfbSPeter Wemm	libncurses.la (libtool)
1367a69bbfbSPeter Wemm
1374a1a9510SRong-En Fan    If you configure using the --enable-widec option, a "w" is appended to the
1384a1a9510SRong-En Fan    library names (e.g., libncursesw.a), and the resulting libraries support
1394a1a9510SRong-En Fan    wide-characters, e.g., via a UTF-8 locale.  The corresponding header files
1404a1a9510SRong-En Fan    are compatible with the non-wide-character configuration; wide-character
1414a1a9510SRong-En Fan    features are provided by ifdef's in the header files.  The wide-character
1424a1a9510SRong-En Fan    library interfaces are not binary-compatible with the non-wide-character
1434a1a9510SRong-En Fan    version.  Building and running the wide-character code relies on a fairly
1444a1a9510SRong-En Fan    recent implementation of libiconv.  We have built this configuration on
14506bfebdeSXin LI    various systems using libiconv, sometimes requiring libutf8.
1464a1a9510SRong-En Fan
147aa59d4d4SRong-En Fan    If you configure using the --with-pthread option, a "t" is appended to
148aa59d4d4SRong-En Fan    the library names (e.g., libncursest.a, libncursestw.a).
149aa59d4d4SRong-En Fan
1500e3d5408SPeter Wemm    If you do not specify any models, the normal and debug libraries will be
1510e3d5408SPeter Wemm    configured.  Typing `configure' with no arguments is equivalent to:
1520e3d5408SPeter Wemm
1530e3d5408SPeter Wemm	./configure --with-normal --with-debug --enable-overwrite
1540e3d5408SPeter Wemm
1550e3d5408SPeter Wemm    Typing
1560e3d5408SPeter Wemm
1570e3d5408SPeter Wemm	./configure --with-shared
1580e3d5408SPeter Wemm
1590e3d5408SPeter Wemm    makes the shared libraries the default, resulting in
1600e3d5408SPeter Wemm
1610e3d5408SPeter Wemm	./configure --with-shared --with-normal --with-debug --enable-overwrite
1620e3d5408SPeter Wemm
1630e3d5408SPeter Wemm    If you want only shared libraries, type
1640e3d5408SPeter Wemm
1650e3d5408SPeter Wemm	./configure --with-shared --without-normal --without-debug
1660e3d5408SPeter Wemm
1670e3d5408SPeter Wemm    Rules for generating shared libraries are highly dependent upon the choice
16806bfebdeSXin LI    of host system and compiler.  We've been testing shared libraries on
16906bfebdeSXin LI    several systems, but more work needs to be done to make shared libraries
1700e3d5408SPeter Wemm    work on other systems.
1710e3d5408SPeter Wemm
1727a69bbfbSPeter Wemm    If you have libtool installed, you can type
1737a69bbfbSPeter Wemm
1747a69bbfbSPeter Wemm	./configure --with-libtool
1757a69bbfbSPeter Wemm
1767a69bbfbSPeter Wemm    to generate the appropriate static and/or shared libraries for your
1777a69bbfbSPeter Wemm    platform using libtool.
1787a69bbfbSPeter Wemm
1790e3d5408SPeter Wemm    You can make curses and terminfo fall back to an existing file of termcap
1800e3d5408SPeter Wemm    definitions by configuring with --enable-termcap.  If you do this, the
1810e3d5408SPeter Wemm    library will search /etc/termcap before the terminfo database, and will
1820e3d5408SPeter Wemm    also interpret the contents of the TERM environment variable.  See the
1830e3d5408SPeter Wemm    section BSD CONVERSION NOTES below.
1840e3d5408SPeter Wemm
1850e3d5408SPeter Wemm3.  Type `make'.  Ignore any warnings, no error messages should be produced.
1860e3d5408SPeter Wemm    This should compile the ncurses library, the terminfo compiler tic(1),
1870e3d5408SPeter Wemm    captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
18818259542SPeter Wemm    programs (see the manual pages for explanation of what they do), some test
1890e3d5408SPeter Wemm    programs, and the panels, menus, and forms libraries.
1900e3d5408SPeter Wemm
1910e3d5408SPeter Wemm4.  Run ncurses and several other test programs in the test directory to
1920e3d5408SPeter Wemm    verify that ncurses functions correctly before doing an install that
1930e3d5408SPeter Wemm    may overwrite system files.  Read the file test/README for details on
1940e3d5408SPeter Wemm    the test programs.
1950e3d5408SPeter Wemm
1960e3d5408SPeter Wemm    NOTE: You must have installed the terminfo database, or set the
1970e3d5408SPeter Wemm    environment variable $TERMINFO to point to a SVr4-compatible terminfo
1980e3d5408SPeter Wemm    database before running the test programs.  Not all vendors' terminfo
1990e3d5408SPeter Wemm    databases are SVr4-compatible, but most seem to be.  Exceptions include
2000e3d5408SPeter Wemm    DEC's Digital Unix (formerly known as OSF/1).
2010e3d5408SPeter Wemm
2024a1a9510SRong-En Fan    If you run the test programs WITHOUT installing terminfo, ncurses may
2034a1a9510SRong-En Fan    read the termcap file and cache that in $HOME/.terminfo, which will
2044a1a9510SRong-En Fan    thereafter be used instead of the terminfo database.  See the comments
2054a1a9510SRong-En Fan    on "--enable-getcap-cache", to see why this is a Bad Thing.
2064a1a9510SRong-En Fan
2074a1a9510SRong-En Fan    It is possible to configure ncurses to use other terminfo database formats.
2084a1a9510SRong-En Fan    A few are provided as examples in the include-directory (see --with-caps).
2094a1a9510SRong-En Fan
2100e3d5408SPeter Wemm    The ncurses program is designed specifically to test the ncurses library.
2110e3d5408SPeter Wemm    You can use it to verify that the screen highlights work correctly, that
2120e3d5408SPeter Wemm    cursor addressing and window scrolling works OK, etc.
2130e3d5408SPeter Wemm
2140e3d5408SPeter Wemm5.  Once you've tested, you can type `make install' to install libraries,
21518259542SPeter Wemm    the programs, the terminfo database and the manual pages.  Alternately, you
2160e3d5408SPeter Wemm    can type `make install' in each directory you want to install.  In the
2170e3d5408SPeter Wemm    top-level directory, you can do a partial install using these commands:
2180e3d5408SPeter Wemm
2190e3d5408SPeter Wemm	'make install.progs'    installs tic, infocmp, etc...
2200e3d5408SPeter Wemm	'make install.includes' installs the headers.
2210e3d5408SPeter Wemm	'make install.libs'     installs the libraries (and the headers).
2220e3d5408SPeter Wemm	'make install.data'     installs the terminfo data. (Note: `tic' must
2230e3d5408SPeter Wemm				be installed before the terminfo data can be
2240e3d5408SPeter Wemm				compiled).
22518259542SPeter Wemm	'make install.man'      installs the manual pages.
2260e3d5408SPeter Wemm
2270e3d5408SPeter Wemm  ############################################################################
2280e3d5408SPeter Wemm  #     CAVEAT EMPTOR: `install.data' run as root will NUKE any existing     #
2290e3d5408SPeter Wemm  #  terminfo database. If you have any custom or unusual entries SAVE them  #
2300e3d5408SPeter Wemm  #  before you install ncurses.  I have a file called terminfo.custom for   #
2310e3d5408SPeter Wemm  #  this purpose.  Don't forget to run tic on the file once you're done.    #
2320e3d5408SPeter Wemm  ############################################################################
2330e3d5408SPeter Wemm
23418259542SPeter Wemm    The terminfo(5) manual page must be preprocessed with tbl(1) before
2350e3d5408SPeter Wemm    being formatted by nroff(1).  Modern man(1) implementations tend to do
23618259542SPeter Wemm    this by default, but you may want to look at your version's manual page
2377a69bbfbSPeter Wemm    to be sure.  You may also install the manual pages after preprocessing
2387a69bbfbSPeter Wemm    with tbl(1) by specifying the configure option --with-manpage-tbl.
2390e3d5408SPeter Wemm
2400e3d5408SPeter Wemm    If the system already has a curses library that you need to keep using
2414a1a9510SRong-En Fan    you'll need to distinguish between it and ncurses.  See the discussion of
2424a1a9510SRong-En Fan    --disable-overwrite.  If ncurses is installed outside the standard
2434a1a9510SRong-En Fan    directories (/usr/include and /usr/lib) then all your users will need to
2444a1a9510SRong-En Fan    use the -I option to compile programs and -L to link them.
2450e3d5408SPeter Wemm
2464a1a9510SRong-En Fan    If you have another curses installed in your system and you accidentally
2470e3d5408SPeter Wemm    compile using its curses.h you'll end up with a large number of
2484a1a9510SRong-En Fan    undefined symbols at link time.
2490e3d5408SPeter Wemm
2500e3d5408SPeter Wemm    IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
2510e3d5408SPeter Wemm    and run the `capconvert' script.  This script will deduce various things
2520e3d5408SPeter Wemm    about your environment and use them to build you a private terminfo tree,
2530e3d5408SPeter Wemm    so you can use ncurses applications.
2540e3d5408SPeter Wemm
2550e3d5408SPeter Wemm    If more than one user at your site does this, the space for the duplicate
2560e3d5408SPeter Wemm    trees is wasted.  Try to get your site administrators to install a system-
2570e3d5408SPeter Wemm    wide terminfo tree instead.
2580e3d5408SPeter Wemm
2590e3d5408SPeter Wemm    See the BSD CONVERSION NOTES section below for a few more details.
2600e3d5408SPeter Wemm
2610e3d5408SPeter Wemm6.  The c++ directory has C++ classes that are built on top of ncurses and
2621759abf3SPeter Wemm    panels.  You must have c++ (and its libraries) installed before you can
2630e3d5408SPeter Wemm    compile and run the demo.
2640e3d5408SPeter Wemm
2651759abf3SPeter Wemm    Use --without-cxx-binding to tell configure to not build the C++ bindings
2661759abf3SPeter Wemm    and demo.
2671759abf3SPeter Wemm
2680e3d5408SPeter Wemm    If you do not have C++, you must use the --without-cxx option to tell
2691759abf3SPeter Wemm    the configure script to not attempt to determine the type of 'bool'
2701759abf3SPeter Wemm    which may be supported by C++.  IF YOU USE THIS OPTION, BE ADVISED THAT
2711759abf3SPeter Wemm    YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++.
2720e3d5408SPeter Wemm
27315589c42SPeter Wemm
27418259542SPeter WemmSUMMARY OF CONFIGURE OPTIONS:
27518259542SPeter Wemm----------------------------
27618259542SPeter Wemm
27718259542SPeter Wemm    The configure script provides a short list of its options when you type
27818259542SPeter Wemm
27918259542SPeter Wemm	./configure --help
28018259542SPeter Wemm
28118259542SPeter Wemm    The --help and several options are common to all configure scripts that are
28218259542SPeter Wemm    generated with autoconf.  Those are all listed before the line
28318259542SPeter Wemm
28418259542SPeter Wemm	--enable and --with options recognized:
28518259542SPeter Wemm
28618259542SPeter Wemm    The other options are specific to this package.  We list them in alphabetic
28718259542SPeter Wemm    order.
28818259542SPeter Wemm
28918259542SPeter Wemm    --disable-assumed-color
29018259542SPeter Wemm	With ncurses 5.1, we introduced a new function, assume_default_colors()
29118259542SPeter Wemm	which allows applications to specify what the default foreground and
29218259542SPeter Wemm	background color are assumed to be.  Most color applications use
29318259542SPeter Wemm	full-screen color; but a few do not color the background.  While the
29418259542SPeter Wemm	assumed values can be overridden by invoking assume_default_colors(),
29518259542SPeter Wemm	you may find it useful to set the assumed values to the pre-5.1
29618259542SPeter Wemm	convention, using this configure option.
29718259542SPeter Wemm
29818259542SPeter Wemm    --disable-big-core
29918259542SPeter Wemm	Assume machine has little memory.  The configure script attempts to
30018259542SPeter Wemm	determine if your machine has enough memory (about 6Mb) to compile the
30118259542SPeter Wemm	terminfo database without writing portions to disk.  Some allocators
30218259542SPeter Wemm	return deceptive results, so you may have to override the configure
30318259542SPeter Wemm	script.  Or you may be building tic for a smaller machine.
30418259542SPeter Wemm
3055ca44d1cSRong-En Fan    --disable-big-strings
3065ca44d1cSRong-En Fan	Disable compile-time optimization of predefined tables which puts
3075ca44d1cSRong-En Fan	all of their strings into a very long string, to reduce relocation
3085ca44d1cSRong-En Fan	overhead.
3095ca44d1cSRong-En Fan
31018259542SPeter Wemm    --disable-database
31118259542SPeter Wemm	Use only built-in data.  The ncurses libraries normally read terminfo
31218259542SPeter Wemm	and termcap data from disk.  You can configure ncurses to have a
31318259542SPeter Wemm	built-in database, aka "fallback" entries.  Embedded applications may
31439f2269fSPeter Wemm	have no need for an external database.  Some, but not all of the
31539f2269fSPeter Wemm	programs are useful in this configuration, e.g., reset and tput versus
31639f2269fSPeter Wemm	infocmp and tic.
31718259542SPeter Wemm
318*73f0a83dSXin LI    --disable-db-install
319*73f0a83dSXin LI	Do not install the terminal database.  This is used to omit features
320*73f0a83dSXin LI	for packages, as done with --without-progs.
321*73f0a83dSXin LI
32218259542SPeter Wemm    --disable-ext-funcs
32318259542SPeter Wemm	Disable function-extensions.  Configure ncurses without the functions
32418259542SPeter Wemm	that are not specified by XSI.  See ncurses/modules for the exact
32518259542SPeter Wemm	list of library modules that would be suppressed.
32618259542SPeter Wemm
32718259542SPeter Wemm    --disable-hashmap
32818259542SPeter Wemm	Compile without hashmap scrolling-optimization code.  This algorithm is
32918259542SPeter Wemm	the default.
33018259542SPeter Wemm
3314a1a9510SRong-En Fan    --disable-home-terminfo
3324a1a9510SRong-En Fan	The $HOME/.terminfo directory is normally added to ncurses' search
3334a1a9510SRong-En Fan	list for reading/writing terminfo entries, since that directory is
3344a1a9510SRong-En Fan	more likely writable than the system terminfo database.  Use this
3354a1a9510SRong-En Fan	option to disable the feature altogether.
3364a1a9510SRong-En Fan
3374a1a9510SRong-En Fan    --disable-largefile
3384a1a9510SRong-En Fan	Disable compiler flags needed to use large-file interfaces.
3394a1a9510SRong-En Fan
34006bfebdeSXin LI    --disable-libtool-version
34106bfebdeSXin LI	when using --with-libtool, control how the major/minor version numbers
34206bfebdeSXin LI	are used for constructing the library name.
34306bfebdeSXin LI
34406bfebdeSXin LI	The default uses the -version-number feature of libtool, which makes
34506bfebdeSXin LI	the library names compatible (though not identical) with the standard
34606bfebdeSXin LI	build using --with-shared.
34706bfebdeSXin LI
34806bfebdeSXin LI	Use --disable-libtool-version to use the libtool -version-info feature.
34906bfebdeSXin LI	This corresponds to the setting used before patch 20100515.
35006bfebdeSXin LI
35118259542SPeter Wemm    --disable-leaks
35218259542SPeter Wemm	For testing, compile-in code that frees memory that normally would not
35318259542SPeter Wemm	be freed, to simplify analysis of memory-leaks.
35418259542SPeter Wemm
3555ca44d1cSRong-En Fan	Any implementation of curses must not free the memory associated with
3565ca44d1cSRong-En Fan	a screen, since (even after calling endwin()), it must be available
3575ca44d1cSRong-En Fan	for use in the next call to refresh().  There are also chunks of
3585ca44d1cSRong-En Fan	memory held for performance reasons.  That makes it hard to analyze
3595ca44d1cSRong-En Fan	curses applications for memory leaks.  To work around this, build
3605ca44d1cSRong-En Fan	a debugging version of the ncurses library which frees those chunks
3615ca44d1cSRong-En Fan	which it can, and provides the _nc_free_and_exit() function to free
3625ca44d1cSRong-En Fan	the remainder on exit.  The ncurses utility and test programs use this
3635ca44d1cSRong-En Fan	feature, e.g., via the ExitProgram() macro.
3645ca44d1cSRong-En Fan
3654a1a9510SRong-En Fan    --disable-lp64
3664a1a9510SRong-En Fan	The header files will ignore use of the _LP64 symbol to make chtype
3674a1a9510SRong-En Fan	and mmask_t types 32 bits (they may be long on 64-bit hosts, for
3684a1a9510SRong-En Fan	compatibility with older releases).
3694a1a9510SRong-En Fan
3704a1a9510SRong-En Fan	NOTE: this is potentially an ABI change, depending on existing
3714a1a9510SRong-En Fan	packages.  The default for this option is "disabled" for ncurses
3724a1a9510SRong-En Fan	ABI 5, and "enabled" for ABI 6.
3734a1a9510SRong-En Fan
37418259542SPeter Wemm    --disable-macros
37518259542SPeter Wemm	For testing, use functions rather than macros.  The program will run
3764a1a9510SRong-En Fan	more slowly, but it is simpler to debug.  This defines NCURSES_NOMACROS
3774a1a9510SRong-En Fan	at build time.  See also the --enable-expanded option.
37818259542SPeter Wemm
37918259542SPeter Wemm    --disable-overwrite
38018259542SPeter Wemm	If you are installing ncurses on a system which contains another
38118259542SPeter Wemm	development version of curses, or which could be confused by the loader
38218259542SPeter Wemm	for another version, we recommend that you leave out the link to
38318259542SPeter Wemm	-lcurses.  The ncurses library is always available as -lncurses.
38418259542SPeter Wemm	Disabling overwrite also causes the ncurses header files to be
38518259542SPeter Wemm	installed into a subdirectory, e.g., /usr/local/include/ncurses,
38618259542SPeter Wemm	rather than the include directory.  This makes it simpler to avoid
38718259542SPeter Wemm	compile-time conflicts with other versions of curses.h
38818259542SPeter Wemm
3895ca44d1cSRong-En Fan    --disable-relink
3905ca44d1cSRong-En Fan	If --enable-rpath is given, the generated makefiles normally will
3915ca44d1cSRong-En Fan	rebuild the libraries during install.  Use this option to simply
3925ca44d1cSRong-En Fan	copy whatever the linked produced.
3935ca44d1cSRong-En Fan
3945ca44d1cSRong-En Fan	This option is ignored if --enable-rpath is not given.
3955ca44d1cSRong-En Fan
39618259542SPeter Wemm    --disable-root-environ
39718259542SPeter Wemm	Compile with environment restriction, so certain environment variables
39818259542SPeter Wemm	are not available when running as root, or via a setuid/setgid
39918259542SPeter Wemm	application.  These are (for example $TERMINFO) those that allow the
40018259542SPeter Wemm	search path for the terminfo or termcap entry to be customized.
40118259542SPeter Wemm
40206bfebdeSXin LI    --disable-rpath-hack
40306bfebdeSXin LI	Normally the configure script helps link libraries found in unusual
40406bfebdeSXin LI	places by adding an rpath option to the link command.  If you are
40506bfebdeSXin LI	building packages, this feature may be redundant.  Use this option
40606bfebdeSXin LI	to suppress the feature.
40706bfebdeSXin LI
40818259542SPeter Wemm    --disable-scroll-hints
40918259542SPeter Wemm	Compile without scroll-hints code.  This option is ignored when
41018259542SPeter Wemm	hashmap scrolling is configured, which is the default.
41118259542SPeter Wemm
4125d08fb1fSRong-En Fan    --disable-tic-depends
4135d08fb1fSRong-En Fan	When building shared libraries, normally the tic library is linked to
414*73f0a83dSXin LI	depend upon the ncurses library (or equivalently, on the tinfo-library
415*73f0a83dSXin LI	if the --with-termlib option was given).  The tic- and tinfo-library
416*73f0a83dSXin LI	ABIs do not depend on the --enable-widec option.  Some packagers have
417*73f0a83dSXin LI	used this to reduce the number of library files which are packaged by
418*73f0a83dSXin LI	using only one copy of those libraries.  To make this work properly,
4195d08fb1fSRong-En Fan	the tic library must be built without an explicit dependency on the
420*73f0a83dSXin LI	underlying library (ncurses vs ncursesw, tinfo vs tinfow).  Use this
421*73f0a83dSXin LI	configure option to do that.
4225d08fb1fSRong-En Fan	For example
4235d08fb1fSRong-En Fan		configure --with-ticlib --with-shared --disable-tic-depends
4245d08fb1fSRong-En Fan
4254a1a9510SRong-En Fan    --disable-tparm-varargs
4264a1a9510SRong-En Fan	Portable programs should call tparm() using the fixed-length parameter
4274a1a9510SRong-En Fan	list documented in X/Open.  ncurses provides varargs support for this
4284a1a9510SRong-En Fan	function.  Use --disable-tparm-varargs to disable this support.
42918259542SPeter Wemm
43018259542SPeter Wemm    --enable-assertions
43118259542SPeter Wemm	For testing, compile-in assertion code.  This is used only for a few
43218259542SPeter Wemm	places where ncurses cannot easily recover by returning an error code.
43318259542SPeter Wemm
43418259542SPeter Wemm    --enable-broken_linker
43518259542SPeter Wemm	A few platforms have what we consider a broken linker:  it cannot link
43618259542SPeter Wemm	objects from an archive solely by referring to data objects in those
43718259542SPeter Wemm	files, but requires a function reference.  This configure option
43818259542SPeter Wemm	changes several data references to functions to work around this
43918259542SPeter Wemm	problem.
44018259542SPeter Wemm
44118259542SPeter Wemm	NOTE: With ncurses 5.1, this may not be necessary, since we are
44218259542SPeter Wemm	told that some linkers interpret uninitialized global data as a
44318259542SPeter Wemm	different type of reference which behaves as described above.  We have
44418259542SPeter Wemm	explicitly initialized all of the global data to work around the
44518259542SPeter Wemm	problem.
44618259542SPeter Wemm
44718259542SPeter Wemm    --enable-bsdpad
44818259542SPeter Wemm	Recognize BSD-style prefix padding.  Some ancient BSD programs (such as
44918259542SPeter Wemm	nethack) call tputs("50") to implement delays.
45018259542SPeter Wemm
45118259542SPeter Wemm    --enable-colorfgbg
45218259542SPeter Wemm	Compile with experimental $COLORFGBG code.  That environment variable
45318259542SPeter Wemm	is set by some terminal emulators as a hint to applications, by
45418259542SPeter Wemm	advertising the default foreground and background colors.  During
45518259542SPeter Wemm	initialization, ncurses sets color pair 0 to match this.
45618259542SPeter Wemm
45718259542SPeter Wemm    --enable-const
45818259542SPeter Wemm	The curses interface as documented in XSI is rather old, in fact
45918259542SPeter Wemm	including features that precede ANSI C.  The prototypes generally do
46018259542SPeter Wemm	not make effective use of "const".  When using stricter compilers (or
46118259542SPeter Wemm	gcc with appropriate warnings), you may see warnings about the mismatch
46218259542SPeter Wemm	between const and non-const data.  We provide a configure option which
46318259542SPeter Wemm	changes the interfaces to use const - quieting these warnings and
46418259542SPeter Wemm	reflecting the actual use of the parameters more closely.  The ncurses
46518259542SPeter Wemm	library uses the symbol NCURSES_CONST for these instances of const,
46618259542SPeter Wemm	and if you have asked for compiler warnings, will add gcc's const-qual
46718259542SPeter Wemm	warning.  There will still be warnings due to subtle inconsistencies
46818259542SPeter Wemm	in the interface, but at a lower level.
46918259542SPeter Wemm
47018259542SPeter Wemm	NOTE: configuring ncurses with this option may detract from the
47118259542SPeter Wemm	portability of your applications by encouraging you to use const in
47218259542SPeter Wemm	places where the XSI curses interface would not allow them.  Similar
47318259542SPeter Wemm	issues arise when porting to SVr4 curses, which uses const in even
47418259542SPeter Wemm	fewer places.
47518259542SPeter Wemm
47618259542SPeter Wemm    --enable-echo
47718259542SPeter Wemm	Use the option --disable-echo to make the build-log less verbose by
47818259542SPeter Wemm	suppressing the display of the compile and link commands.  This makes
47918259542SPeter Wemm	it easier to see the compiler warnings.  (You can always use "make -n"
48018259542SPeter Wemm	to see the options that are used).
48118259542SPeter Wemm
48218259542SPeter Wemm    --enable-expanded
48318259542SPeter Wemm	For testing, generate functions for certain macros to make them visible
48418259542SPeter Wemm	as such to the debugger.  See also the --disable-macros option.
48518259542SPeter Wemm
4864a1a9510SRong-En Fan    --enable-ext-colors
4874a1a9510SRong-En Fan	Extend the cchar_t structure to allow more than 16 colors to be
4884a1a9510SRong-En Fan	encoded.  This applies only to the wide-character (--enable-widec)
4894a1a9510SRong-En Fan	configuration.
4904a1a9510SRong-En Fan
4914a1a9510SRong-En Fan	NOTE: using this option will make libraries which are not binary-
4924a1a9510SRong-En Fan	compatible with libncursesw 5.4.  None of the interfaces change, but
4934a1a9510SRong-En Fan	applications which have an array of cchar_t's must be recompiled.
4944a1a9510SRong-En Fan
4954a1a9510SRong-En Fan    --enable-ext-mouse
4964a1a9510SRong-En Fan	Modify the encoding of mouse state to make room for a 5th mouse button.
4974a1a9510SRong-En Fan	That allows one to use ncurses with a wheel mouse with xterm or
4984a1a9510SRong-En Fan	similar X terminal emulators.
4994a1a9510SRong-En Fan
5004a1a9510SRong-En Fan	NOTE: using this option will make libraries which are not binary-
5014a1a9510SRong-En Fan	compatible with libncursesw 5.4.  None of the interfaces change, but
5024a1a9510SRong-En Fan	applications which have mouse mask mmask_t's must be recompiled.
5034a1a9510SRong-En Fan
50418259542SPeter Wemm    --enable-getcap
50518259542SPeter Wemm	Use the 4.4BSD getcap code if available, or a bundled version of it to
50618259542SPeter Wemm	fetch termcap entries.  Entries read in this way cannot use (make
50718259542SPeter Wemm	cross-references to) the terminfo tree, but it is faster than reading
50818259542SPeter Wemm	/etc/termcap.
50918259542SPeter Wemm
5104a1a9510SRong-En Fan	If configured for one of the *BSD systems, this automatically uses
5114a1a9510SRong-En Fan	the hashed database system produced using cap_mkdb or similar tools.
5124a1a9510SRong-En Fan	In that case, there is no advantage in using the --enable-getcap-cache
5134a1a9510SRong-En Fan	option.
5144a1a9510SRong-En Fan
5154a1a9510SRong-En Fan	See also the --with-hashed-db option.
5164a1a9510SRong-En Fan
51718259542SPeter Wemm    --enable-getcap-cache
51818259542SPeter Wemm	Cache translated termcaps under the directory $HOME/.terminfo
51918259542SPeter Wemm
52018259542SPeter Wemm	NOTE: this sounds good - it makes ncurses run faster the second time.
52118259542SPeter Wemm	But look where the data comes from - an /etc/termcap containing lots of
52218259542SPeter Wemm	entries that are not up to date.  If you configure with this option and
52318259542SPeter Wemm	forget to install the terminfo database before running an ncurses
52418259542SPeter Wemm	application, you will end up with a hidden terminfo database that
52518259542SPeter Wemm	generally does not support color and will miss some function keys.
52618259542SPeter Wemm
52718259542SPeter Wemm    --enable-hard-tabs
52818259542SPeter Wemm	Compile-in cursor-optimization code that uses hard-tabs.  We would make
52918259542SPeter Wemm	this a standard feature except for the concern that the terminfo entry
53018259542SPeter Wemm	may not be accurate, or that your stty settings have disabled the use
53118259542SPeter Wemm	of tabs.
53218259542SPeter Wemm
53306bfebdeSXin LI    --enable-interop
53406bfebdeSXin LI	Compile-in experimental interop bindings.  These provide generic types
53506bfebdeSXin LI	for the form-library.
53606bfebdeSXin LI
5375ca44d1cSRong-En Fan    --enable-mixed-case
5385ca44d1cSRong-En Fan	Controls whether the filesystem on which the terminfo database resides
5395ca44d1cSRong-En Fan	supports mixed-case filenames (normal for UNIX, but not on other
5405ca44d1cSRong-En Fan	systems).  If you do not specify this option, the configure script
5415ca44d1cSRong-En Fan	checks the current filesystem.
5425ca44d1cSRong-En Fan
54318259542SPeter Wemm    --enable-no-padding
54418259542SPeter Wemm	Compile-in support for the $NCURSES_NO_PADDING environment variable,
54518259542SPeter Wemm	which allows you to suppress the effect of non-mandatory padding in
54618259542SPeter Wemm	terminfo entries.  This is the default, unless you have disabled the
54718259542SPeter Wemm	extended functions.
54818259542SPeter Wemm
54906bfebdeSXin LI    --enable-pc-files
55006bfebdeSXin LI	If pkg-config is found (see --with-pkg-config), generate ".pc" files
55106bfebdeSXin LI	for each of the libraries, and install them in pkg-config's library
55206bfebdeSXin LI	directory.
55306bfebdeSXin LI
55406bfebdeSXin LI    --enable-pthreads-eintr
55506bfebdeSXin LI	add logic in threaded configuration to ensure that a read(2) system
55606bfebdeSXin LI	call can be interrupted for SIGWINCH.
55706bfebdeSXin LI
5585ca44d1cSRong-En Fan    --enable-reentrant
5595ca44d1cSRong-En Fan	Compile experimental configuration which improves reentrant use of the
560aa59d4d4SRong-En Fan	library by reducing global and static variables.  This option is also
561aa59d4d4SRong-En Fan	set if --with-pthread is used.
5625ca44d1cSRong-En Fan
563*73f0a83dSXin LI	Enabling this option adds a "t" to the library names, except for the
564*73f0a83dSXin LI	special case when --enable-weak-symbols is also used.
565*73f0a83dSXin LI
56618259542SPeter Wemm    --enable-rpath
5674a1a9510SRong-En Fan	Use rpath option when generating shared libraries, and (with some
5684a1a9510SRong-En Fan	restrictions) when linking the corresponding programs.  This originally
5694a1a9510SRong-En Fan	(in 1997) applied mainly to systems using the GNU linker (read the
5704a1a9510SRong-En Fan	manpage).
5714a1a9510SRong-En Fan
5724a1a9510SRong-En Fan	More recently it is useful for systems that require special treatment
5734a1a9510SRong-En Fan	shared libraries in "unusual" locations.  The "system" libraries reside
5744a1a9510SRong-En Fan	in directories which are on the loader's default search-path.  While
5754a1a9510SRong-En Fan	you may be able to use workarounds such as the $LD_LIBRARY_PATH
5764a1a9510SRong-En Fan	environment variable, they do not work with setuid applications since
5774a1a9510SRong-En Fan	the LD_LIBRARY_PATH variable would be unset in that situation.
57818259542SPeter Wemm
5795ca44d1cSRong-En Fan	This option does not apply to --with-libtool, since libtool makes
5805ca44d1cSRong-En Fan	extra assumptions about rpath.
5815ca44d1cSRong-En Fan
58218259542SPeter Wemm    --enable-safe-sprintf
58318259542SPeter Wemm	Compile with experimental safe-sprintf code.  You may consider using
58418259542SPeter Wemm	this if you are building ncurses for a system that has neither
58518259542SPeter Wemm	vsnprintf() or vsprintf().  It is slow, however.
58618259542SPeter Wemm
58718259542SPeter Wemm    --enable-sigwinch
58818259542SPeter Wemm	Compile support for ncurses' SIGWINCH handler.  If your application has
58918259542SPeter Wemm	its own SIGWINCH handler, ncurses will not use its own.  The ncurses
59018259542SPeter Wemm	handler causes wgetch() to return KEY_RESIZE when the screen-size
59118259542SPeter Wemm	changes.  This option is the default, unless you have disabled the
59218259542SPeter Wemm	extended functions.
59318259542SPeter Wemm
5944a1a9510SRong-En Fan    --enable-signed-char
5954a1a9510SRong-En Fan	The term.h header declares a Booleans[] array typed "char".  But it
5964a1a9510SRong-En Fan	stores signed values there and "char" is not necessarily signed.
5974a1a9510SRong-En Fan	Some packagers choose to alter the type of Booleans[] though this
5984a1a9510SRong-En Fan	is not strictly compatible.  This option allows one to implement this
5994a1a9510SRong-En Fan	alteration without patching the source code.
6004a1a9510SRong-En Fan
60106bfebdeSXin LI    --enable-sp-funcs
60206bfebdeSXin LI	Compile-in support for extended functions which accept a SCREEN pointer,
60306bfebdeSXin LI	reducing the need for juggling the global SP value with set_term() and
60406bfebdeSXin LI	delscreen().
60506bfebdeSXin LI
606*73f0a83dSXin LI    --enable-string-hacks
607*73f0a83dSXin LI	Controls whether strlcat and strlcpy may be used.  The same issue
608*73f0a83dSXin LI	applies to OpenBSD's warnings about snprintf, noting that this function
609*73f0a83dSXin LI	is weakly standardized.
610*73f0a83dSXin LI
611*73f0a83dSXin LI	Aside from stifling these warnings, there is no functional improvement
612*73f0a83dSXin LI	in ncurses.
613*73f0a83dSXin LI
61418259542SPeter Wemm    --enable-symlinks
61518259542SPeter Wemm	If your system supports symbolic links, make tic use symbolic links
61618259542SPeter Wemm	rather than hard links to save diskspace when writing aliases in the
61718259542SPeter Wemm	terminfo database.
61818259542SPeter Wemm
61918259542SPeter Wemm    --enable-tcap-names
62018259542SPeter Wemm	Compile-in support for user-definable terminal capabilities.  Use the
62118259542SPeter Wemm	-x option of tic and infocmp to treat unrecognized terminal
62218259542SPeter Wemm	capabilities as user-defined strings.  This option is the default,
62318259542SPeter Wemm	unless you have disabled the extended functions.
62418259542SPeter Wemm
62506bfebdeSXin LI    --enable-term-driver
62606bfebdeSXin LI	Enable experimental terminal-driver.  This is currently used for the
62706bfebdeSXin LI	MinGW port, by providing a way to substitute the low-level terminfo
62806bfebdeSXin LI	library with different terminal drivers.
62906bfebdeSXin LI
63018259542SPeter Wemm    --enable-termcap
63118259542SPeter Wemm	Compile in support for reading terminal descriptions from termcap if no
63218259542SPeter Wemm	match is found in the terminfo database.  See also the --enable-getcap
63318259542SPeter Wemm	and --enable-getcap-cache options.
63418259542SPeter Wemm
635*73f0a83dSXin LI	Termcap support requires run-time parsing rather than loading
636*73f0a83dSXin LI	predigested data.  If you have specified --with-ticlib, then you
637*73f0a83dSXin LI	cannot have termcap support since run-time parsing is done in the
638*73f0a83dSXin LI	tic library, which is intentionally not part of normal linkage
639*73f0a83dSXin LI	dependencies.
640*73f0a83dSXin LI
64118259542SPeter Wemm    --enable-warnings
64218259542SPeter Wemm	Turn on GCC compiler warnings.  There should be only a few.
64318259542SPeter Wemm
6445d08fb1fSRong-En Fan    --enable-weak-symbols
6455d08fb1fSRong-En Fan	If the --with-pthread option is set, check if the compiler supports
6465d08fb1fSRong-En Fan	weak-symbols.  If it does, then name the thread-capable library without
6475d08fb1fSRong-En Fan	the "t" (libncurses rather than libncursest), and provide for
6485d08fb1fSRong-En Fan	dynamically loading the pthreads entrypoints at runtime.  This allows
6495d08fb1fSRong-En Fan	one to reduce the number of library files for ncurses.
6505d08fb1fSRong-En Fan
6514a1a9510SRong-En Fan    --enable-wgetch-events
6524a1a9510SRong-En Fan	Compile with experimental wgetch-events code.  See ncurses/README.IZ
6534a1a9510SRong-En Fan
65418259542SPeter Wemm    --enable-widec
6554a1a9510SRong-En Fan	Compile with wide-character code.  This makes a different version of
6564a1a9510SRong-En Fan	the libraries (e.g., libncursesw.so), which stores characters as
6574a1a9510SRong-En Fan	wide-characters,
65818259542SPeter Wemm
65918259542SPeter Wemm	NOTE: applications compiled with this configuration are not compatible
66018259542SPeter Wemm	with those built for 8-bit characters.  You cannot simply make a
66118259542SPeter Wemm	symbolic link to equate libncurses.so with libncursesw.so
66218259542SPeter Wemm
6634a1a9510SRong-En Fan	NOTE: the Ada95 binding may be built against either version of the the
6644a1a9510SRong-En Fan	ncurses library, but you must decide which:  the binding installs the
6654a1a9510SRong-En Fan	same set of files for either version.  Currently (2002/6/22) it does
6664a1a9510SRong-En Fan	not use the extended features from the wide-character code, so it is
6674a1a9510SRong-En Fan	probably better to not install the binding for that configuration.
6684a1a9510SRong-En Fan
66918259542SPeter Wemm    --enable-xmc-glitch
67018259542SPeter Wemm	Compile-in support experimental xmc (magic cookie) code.
67118259542SPeter Wemm
6724a1a9510SRong-En Fan    --with-abi-version=NUM
6734a1a9510SRong-En Fan	Override the ABI version, which is used in shared library filenames.
6744a1a9510SRong-En Fan	Normally this is the same as the release version; some ports have
6754a1a9510SRong-En Fan	special requirements for compatibility.
6764a1a9510SRong-En Fan
6775d08fb1fSRong-En Fan	This option does not affect linking with libtool, which uses the
6785d08fb1fSRong-En Fan	release major/minor numbers.
6795d08fb1fSRong-En Fan
68018259542SPeter Wemm    --with-ada-compiler=CMD
68118259542SPeter Wemm	Specify the Ada95 compiler command (default "gnatmake")
68218259542SPeter Wemm
68318259542SPeter Wemm    --with-ada-include=DIR
68418259542SPeter Wemm	Tell where to install the Ada includes (default:
68518259542SPeter Wemm	PREFIX/lib/ada/adainclude)
68618259542SPeter Wemm
68718259542SPeter Wemm    --with-ada-objects=DIR
68818259542SPeter Wemm	Tell where to install the Ada objects (default:  PREFIX/lib/ada/adalib)
68918259542SPeter Wemm
69006bfebdeSXin LI    --with-ada-sharedlib
69106bfebdeSXin LI	Build a shared library for Ada95 binding, if the compiler permits.
69206bfebdeSXin LI
69306bfebdeSXin LI	NOTE: You must also set the --with-shared option on some platforms
69406bfebdeSXin LI	for a successful build.  You need not use this option when you set
69506bfebdeSXin LI	--with-shared, unless you want to use the Ada shared library.
69606bfebdeSXin LI
69739f2269fSPeter Wemm    --with-bool=TYPE
69839f2269fSPeter Wemm	If --without-cxx is specified, override the type used for the "bool"
69939f2269fSPeter Wemm	declared in curses.h (normally the type is automatically chosen to
70039f2269fSPeter Wemm	correspond with that in <stdbool.h>, or defaults to platform-specific
70139f2269fSPeter Wemm	sizes).
70239f2269fSPeter Wemm
70306bfebdeSXin LI    --with-build-cpp=XXX
70406bfebdeSXin LI	This option is provided by the same macro used for $BUILD_CC, etc.,
70506bfebdeSXin LI	but is not directly used by ncurses.
70606bfebdeSXin LI
70739f2269fSPeter Wemm    --with-build-cc=XXX
70839f2269fSPeter Wemm	If cross-compiling, specify a host C compiler, which is needed to
7094a1a9510SRong-En Fan	compile a few utilities which generate source modules for ncurses.
71039f2269fSPeter Wemm	If you do not give this option, the configure script checks if the
71139f2269fSPeter Wemm	$BUILD_CC variable is set, and otherwise defaults to gcc or cc.
71239f2269fSPeter Wemm
71339f2269fSPeter Wemm    --with-build-cflags=XXX
71439f2269fSPeter Wemm	If cross-compiling, specify the host C compiler-flags.  You might need
71539f2269fSPeter Wemm	to do this if the target compiler has unusual flags which confuse the
71639f2269fSPeter Wemm	host compiler.
71739f2269fSPeter Wemm
7185d08fb1fSRong-En Fan	You can also set the environment variable $BUILD_CFLAGS rather than
7195d08fb1fSRong-En Fan	use this option.
7205d08fb1fSRong-En Fan
7214a1a9510SRong-En Fan    --with-build-cppflags=XXX
7224a1a9510SRong-En Fan	If cross-compiling, specify the host C preprocessor-flags.  You might
7234a1a9510SRong-En Fan	need to do this if the target compiler has unusual flags which confuse
7244a1a9510SRong-En Fan	the host compiler.
7254a1a9510SRong-En Fan
7265d08fb1fSRong-En Fan	You can also set the environment variable $BUILD_CPPFLAGS rather than
7275d08fb1fSRong-En Fan	use this option.
7285d08fb1fSRong-En Fan
72939f2269fSPeter Wemm    --with-build-ldflags=XXX
73039f2269fSPeter Wemm	If cross-compiling, specify the host linker-flags.  You might need to
73139f2269fSPeter Wemm	do this if the target linker has unusual flags which confuse the host
73239f2269fSPeter Wemm	compiler.
73339f2269fSPeter Wemm
7345d08fb1fSRong-En Fan	You can also set the environment variable $BUILD_LDFLAGS rather than
7355d08fb1fSRong-En Fan	use this option.
7365d08fb1fSRong-En Fan
73739f2269fSPeter Wemm    --with-build-libs=XXX
73839f2269fSPeter Wemm	If cross-compiling, the host libraries.  You might need to do this if
73939f2269fSPeter Wemm	the target environment requires unusual libraries.
74039f2269fSPeter Wemm
7415d08fb1fSRong-En Fan	You can also set the environment variable $BUILD_LIBS rather than
7425d08fb1fSRong-En Fan	use this option.
7435d08fb1fSRong-En Fan
74439f2269fSPeter Wemm    --with-caps=XXX
74539f2269fSPeter Wemm	Specify an alternate terminfo capabilities file, which makes the
74639f2269fSPeter Wemm	configure script look for "include/Caps.XXX".  A few systems, e.g.,
74739f2269fSPeter Wemm	AIX 4.x use the same overall file-format as ncurses for terminfo
74839f2269fSPeter Wemm	data, but use different alignments within the tables to support
74939f2269fSPeter Wemm	legacy applications.  For those systems, you can configure ncurses
75039f2269fSPeter Wemm	to use a terminfo database which is compatible with the native
75139f2269fSPeter Wemm	applications.
75239f2269fSPeter Wemm
75306bfebdeSXin LI    --with-ccharw-max=XXX
75406bfebdeSXin LI	Override the size of the wide-character array in cchar_t structures.
75506bfebdeSXin LI	Changing this will alter the binary interface.  This defaults to 5.
75606bfebdeSXin LI
7574a1a9510SRong-En Fan    --with-chtype=TYPE
7584a1a9510SRong-En Fan	Override type of chtype, which stores the video attributes and (if
7594a1a9510SRong-En Fan	--enable-widec is not given) a character.  Prior to ncurses 5.5, this
7604a1a9510SRong-En Fan	was always unsigned long, but with ncurses 5.5, it may be unsigned.
7614a1a9510SRong-En Fan	Use this option if you need to preserve compatibility with 64-bit
76206bfebdeSXin LI	executables, e.g., by setting "--with-chtype=long" (the configure
76306bfebdeSXin LI	script supplies "unsigned").
7644a1a9510SRong-En Fan
765*73f0a83dSXin LI    --with-cxx-shared
766*73f0a83dSXin LI	When --with-shared is set, build libncurses++ as a shared library.
767*73f0a83dSXin LI	This implicitly relies upon building with gcc/g++, since other
768*73f0a83dSXin LI	compiler suites may have differences in the way shared libraries are
769*73f0a83dSXin LI	built.  libtool by the way has similar limitations.
770*73f0a83dSXin LI
77118259542SPeter Wemm    --with-database=XXX
77218259542SPeter Wemm	Specify the terminfo source file to install.  Usually you will wish
77318259542SPeter Wemm	to install ncurses' default (misc/terminfo.src).  Certain systems
77418259542SPeter Wemm	have special requirements, e.g, OS/2 EMX has a customized terminfo
77518259542SPeter Wemm	source file.
77618259542SPeter Wemm
77718259542SPeter Wemm    --with-dbmalloc
77818259542SPeter Wemm	For testing, compile and link with Conor Cahill's dbmalloc library.
7794a1a9510SRong-En Fan	This also sets the --disable-leaks option.
78018259542SPeter Wemm
78118259542SPeter Wemm    --with-debug
78218259542SPeter Wemm	Generate debug-libraries (default).  These are named by adding "_g"
78318259542SPeter Wemm	to the root, e.g., libncurses_g.a
78418259542SPeter Wemm
78518259542SPeter Wemm    --with-default-terminfo-dir=XXX
78618259542SPeter Wemm	Specify the default terminfo database directory.  This is normally
78718259542SPeter Wemm	DATADIR/terminfo, e.g., /usr/share/terminfo.
78818259542SPeter Wemm
78918259542SPeter Wemm    --with-dmalloc
79018259542SPeter Wemm	For testing, compile and link with Gray Watson's dmalloc library.
7914a1a9510SRong-En Fan	This also sets the --disable-leaks option.
79218259542SPeter Wemm
79318259542SPeter Wemm    --with-fallbacks=XXX
79418259542SPeter Wemm	Specify a list of fallback terminal descriptions which will be
79518259542SPeter Wemm	compiled into the ncurses library.  See CONFIGURING FALLBACK ENTRIES.
79618259542SPeter Wemm
79718259542SPeter Wemm    --with-gpm
79818259542SPeter Wemm	use Alessandro Rubini's GPM library to provide mouse support on the
7994a1a9510SRong-En Fan	Linux console.  Prior to ncurses 5.5, this introduced a dependency on
8004a1a9510SRong-En Fan	the GPM library.
8014a1a9510SRong-En Fan
8024a1a9510SRong-En Fan	Currently ncurses uses the dlsym() function to bind to the library at
8034a1a9510SRong-En Fan	runtime, so it is only necessary that the library be present when
8044a1a9510SRong-En Fan	ncurses is built, to obtain the filename (or soname) used in the
8054a1a9510SRong-En Fan	corresponding dlopen() call.  If you give a value for this option,
8064a1a9510SRong-En Fan	e.g.,
8074a1a9510SRong-En Fan
8084a1a9510SRong-En Fan		--with-gpm=$HOME/tmp/test-gpm.so
8094a1a9510SRong-En Fan
8104a1a9510SRong-En Fan	that overrides the configure check for the soname.
8114a1a9510SRong-En Fan
8124a1a9510SRong-En Fan	See also --without-dlsym
8134a1a9510SRong-En Fan
8145ca44d1cSRong-En Fan    --with-hashed-db[=XXX]
8154a1a9510SRong-En Fan	Use a hashed database for storing terminfo data rather than storing
8164a1a9510SRong-En Fan	each compiled entry in a separate binary file within a directory
8174a1a9510SRong-En Fan	tree.
8184a1a9510SRong-En Fan
8195ca44d1cSRong-En Fan	In particular, this uses the Berkeley database 1.8.5 interface, as
8205ca44d1cSRong-En Fan	provided by that and its successors db 2, 3, and 4.  The actual
8215ca44d1cSRong-En Fan	interface is slightly different in the successor versions of the
8225ca44d1cSRong-En Fan	Berkeley database.  The database should have been configured using
8235ca44d1cSRong-En Fan	"--enable-compat185".
8245ca44d1cSRong-En Fan
8254a1a9510SRong-En Fan	If you use this option for configuring ncurses, tic will only be able
8264a1a9510SRong-En Fan	to write entries in the hashed database.  infocmp can still read
8274a1a9510SRong-En Fan	entries from a directory tree as well as reading entries from the
8284a1a9510SRong-En Fan	hashed database.  To do this, infocmp determines whether the $TERMINFO
8294a1a9510SRong-En Fan	variable points to a directory or a file, and reads the directory-tree
8304a1a9510SRong-En Fan	or hashed database respectively.
8314a1a9510SRong-En Fan
8324a1a9510SRong-En Fan	You cannot have a directory containing both hashed-database and
8334a1a9510SRong-En Fan	filesystem-based terminfo entries.
8344a1a9510SRong-En Fan
8355ca44d1cSRong-En Fan	Use the parameter value to give the install-prefix used for the
8365ca44d1cSRong-En Fan	datbase, e.g.,
8375ca44d1cSRong-En Fan		--with-hashed-db=/usr/local/BigBase
8385ca44d1cSRong-En Fan	to find the corresponding include- and lib-directories under the
8395ca44d1cSRong-En Fan	given directory.
8405ca44d1cSRong-En Fan
8414a1a9510SRong-En Fan	See also the --enable-getcap option.
84218259542SPeter Wemm
84318259542SPeter Wemm    --with-install-prefix=XXX
84418259542SPeter Wemm	Allows you to specify an alternate location for installing ncurses
84518259542SPeter Wemm	after building it.  The value you specify is prepended to the "real"
8464a1a9510SRong-En Fan	install location.  This simplifies making binary packages.  The
8474a1a9510SRong-En Fan	makefile variable DESTDIR is set by this option.  It is also possible
8484a1a9510SRong-En Fan	to use
8494a1a9510SRong-En Fan		make install DESTDIR=XXX
8504a1a9510SRong-En Fan	since the makefiles pass that variable to subordinate makes.
85118259542SPeter Wemm
85218259542SPeter Wemm	NOTE: a few systems build shared libraries with fixed pathnames; this
85318259542SPeter Wemm	option probably will not work for those configurations.
85418259542SPeter Wemm
855*73f0a83dSXin LI    --with-lib-prefix=XXX
856*73f0a83dSXin LI	OS/2 EMX used a different naming convention from most Unix-like
857*73f0a83dSXin LI	platforms.  It required that the "lib" part of a library name was
858*73f0a83dSXin LI	omitted.  Newer EMX as part of eComStation does not follow that
859*73f0a83dSXin LI	convention.  Use this option to override the configure script's
860*73f0a83dSXin LI	assumptions about the library-prefix.  If this option is omitted, it
861*73f0a83dSXin LI	uses the original OS/2 EMX convention for that platform.  Use
862*73f0a83dSXin LI	"--with-lib-prefix=lib" for the newer EMX in eComStation.  Use
863*73f0a83dSXin LI	"--without-lib-prefix" to suppress it for other odd platforms.
864*73f0a83dSXin LI
8654a1a9510SRong-En Fan    --with-libtool[=XXX]
8664a1a9510SRong-En Fan	Generate libraries with libtool.  If this option is selected, then it
8674a1a9510SRong-En Fan	overrides all other library model specifications.  Note that libtool
8684a1a9510SRong-En Fan	must already be installed, uses makefile rules dependent on GNU make,
8694a1a9510SRong-En Fan	and does not promise to follow the version numbering convention of
8704a1a9510SRong-En Fan	other shared libraries on your system.  However, if the --with-shared
8714a1a9510SRong-En Fan	option does not succeed, you may get better results with this option.
8724a1a9510SRong-En Fan
8734a1a9510SRong-En Fan	If a parameter value is given, it must be the full pathname of the
8744a1a9510SRong-En Fan	particular version of libtool, e.g.,
8754a1a9510SRong-En Fan		/usr/bin/libtool-1.2.3
8764a1a9510SRong-En Fan
8774a1a9510SRong-En Fan	It is possible to rebuild the configure script to use the automake
8784a1a9510SRong-En Fan	macros for libtool, e.g., AC_PROG_LIBTOOL.  See the comments in
8794a1a9510SRong-En Fan	aclocal.m4 for CF_PROG_LIBTOOL, and ensure that you build configure
8804a1a9510SRong-En Fan	using the appropriate patch for autoconf from
8814a1a9510SRong-En Fan		http://invisible-island.net/autoconf/
8824a1a9510SRong-En Fan
8834a1a9510SRong-En Fan    --with-manpage-aliases
8844a1a9510SRong-En Fan	Tell the configure script you wish to create entries in the
8854a1a9510SRong-En Fan	man-directory for aliases to manpages which list them, e.g., the
8864a1a9510SRong-En Fan	functions in the panel manpage.  This is the default.  You can disable
8874a1a9510SRong-En Fan	it if your man program does this.  You can also disable
8884a1a9510SRong-En Fan	--with-manpage-symlinks to install files containing a ".so" command
8894a1a9510SRong-En Fan	rather than symbolic links.
8907a69bbfbSPeter Wemm
89118259542SPeter Wemm    --with-manpage-format=XXX
89218259542SPeter Wemm	Tell the configure script how you would like to install man-pages.  The
89318259542SPeter Wemm	option value must be one of these:  gzip, compress, BSDI, normal,
89418259542SPeter Wemm	formatted.  If you do not give this option, the configure script
89518259542SPeter Wemm	attempts to determine which is the case.
89618259542SPeter Wemm
89718259542SPeter Wemm    --with-manpage-renames=XXX
89818259542SPeter Wemm	Tell the configure script that you wish to rename the manpages while
89906bfebdeSXin LI	installing.  Currently the only distribution which does this is Debian.
90006bfebdeSXin LI	The option value specifies the name of a file that lists the renamed
90106bfebdeSXin LI	files, e.g., $srcdir/man/man_db.renames
90218259542SPeter Wemm
90318259542SPeter Wemm    --with-manpage-symlinks
90418259542SPeter Wemm	Tell the configure script that you wish to make symbolic links in the
90518259542SPeter Wemm	man-directory for aliases to the man-pages.  This is the default, but
90618259542SPeter Wemm	can be disabled for systems that provide this automatically.  Doing
90718259542SPeter Wemm	this on systems that do not support symbolic links will result in
90818259542SPeter Wemm	copying the man-page for each alias.
90918259542SPeter Wemm
9107a69bbfbSPeter Wemm    --with-manpage-tbl
9117a69bbfbSPeter Wemm	Tell the configure script that you with to preprocess the manpages
9127a69bbfbSPeter Wemm	by running them through tbl to generate tables understandable by
9137a69bbfbSPeter Wemm	nroff.
9147a69bbfbSPeter Wemm
9154a1a9510SRong-En Fan    --with-mmask-t=TYPE
9164a1a9510SRong-En Fan	Override type of mmask_t, which stores the mouse mask.  Prior to
9174a1a9510SRong-En Fan	ncurses 5.5, this was always unsigned long, but with ncurses 5.5, it
9184a1a9510SRong-En Fan	may be unsigned.  Use this option if you need to preserve compatibility
9194a1a9510SRong-En Fan	with 64-bit executables.
9204a1a9510SRong-En Fan
9215d08fb1fSRong-En Fan    --with-normal
9225d08fb1fSRong-En Fan	Generate normal (i.e., static) libraries (default).
9235d08fb1fSRong-En Fan
9245d08fb1fSRong-En Fan	Note:  on Linux, the configure script will attempt to use the GPM
9255d08fb1fSRong-En Fan	library via the dlsym() function call.  Use --without-dlsym to disable
9265d08fb1fSRong-En Fan	this feature, or --without-gpm, depending on whether you wish to use
9275d08fb1fSRong-En Fan	GPM.
9285d08fb1fSRong-En Fan
9297a69bbfbSPeter Wemm    --with-ospeed=TYPE
9307a69bbfbSPeter Wemm	Override type of ospeed variable, which is part of the termcap
9317a69bbfbSPeter Wemm	compatibility interface.  In termcap, this is a 'short', which works
9327a69bbfbSPeter Wemm	for a wide range of baudrates because ospeed is not the actual speed
9337a69bbfbSPeter Wemm	but the encoded value, e.g., B9600 would be a small number such as 13.
9347a69bbfbSPeter Wemm	However the encoding scheme originally allowed for values "only" up to
9357a69bbfbSPeter Wemm	38400bd.  A newer set of definitions past 38400bd is not encoded as
9367a69bbfbSPeter Wemm	compactly, and is not guaranteed to fit into a short (see the function
9377a69bbfbSPeter Wemm	cfgetospeed(), which returns a speed_t for this reason).  In practice,
9387a69bbfbSPeter Wemm	applications that required knowledge of the ospeed variable, i.e.,
9397a69bbfbSPeter Wemm	those using termcap, do not use the higher speeds.  Your application
9407a69bbfbSPeter Wemm	(or system, in general) may or may not.
9417a69bbfbSPeter Wemm
94206bfebdeSXin LI    --with-pkg-config=[DIR]
94306bfebdeSXin LI	Check for pkg-config, optionally specifying its path.
94406bfebdeSXin LI
945*73f0a83dSXin LI    --with-pkg-config-libdir=[DIR]
946*73f0a83dSXin LI	If pkg-config was found, override the automatic check for its library
947*73f0a83dSXin LI	path.
948*73f0a83dSXin LI
94918259542SPeter Wemm    --with-profile
95018259542SPeter Wemm	Generate profile-libraries These are named by adding "_p" to the root,
95118259542SPeter Wemm	e.g., libncurses_p.a
95218259542SPeter Wemm
953aa59d4d4SRong-En Fan    --with-pthread
954aa59d4d4SRong-En Fan	Link with POSIX threads, set --enable-reentrant.  The use_window() and
955aa59d4d4SRong-En Fan	use_screen() functions will use mutex's, allowing rudimentary support
956aa59d4d4SRong-En Fan	for multithreaded applications.
957aa59d4d4SRong-En Fan
95818259542SPeter Wemm    --with-rcs-ids
95918259542SPeter Wemm	Compile-in RCS identifiers.  Most of the C files have an identifier.
96018259542SPeter Wemm
9614a1a9510SRong-En Fan    --with-rel-version=NUM
9624a1a9510SRong-En Fan	Override the release version, which may be used in shared library
9634a1a9510SRong-En Fan	filenames.  This consists of a major and minor version number separated
9644a1a9510SRong-En Fan	by ".".  Normally the major version number is the same as the ABI
9654a1a9510SRong-En Fan	version; some ports have special requirements for compatibility.
9664a1a9510SRong-En Fan
96718259542SPeter Wemm    --with-shared
96818259542SPeter Wemm	Generate shared-libraries.  The names given depend on the system for
96918259542SPeter Wemm	which you are building, typically using a ".so" suffix, along with
97018259542SPeter Wemm	symbolic links that refer to the release version.
97118259542SPeter Wemm
97218259542SPeter Wemm	NOTE: Unless you override the configure script by setting the $CFLAGS
97318259542SPeter Wemm	environment variable, these will not be built with the -g debugging
97418259542SPeter Wemm	option.
97518259542SPeter Wemm
9764a1a9510SRong-En Fan	NOTE: For some configurations, e.g., installing a new version of
9774a1a9510SRong-En Fan	ncurses shared libraries on a machine which already has ncurses
9784a1a9510SRong-En Fan	shared libraries, you may encounter problems with the linker.
9794a1a9510SRong-En Fan	For example, it may prevent you from running  the build tree's
9804a1a9510SRong-En Fan	copy of tic (for installing the terminfo database) because it
9814a1a9510SRong-En Fan	loads the system's copy of the ncurses shared libraries.  In that
9824a1a9510SRong-En Fan	case, using the misc/shlib script may be helpful, since it sets
9834a1a9510SRong-En Fan	$LD_LIBRARY_PATH to point to the build tree, e.g.,
9844a1a9510SRong-En Fan		./misc/shlib make install
9854a1a9510SRong-En Fan
98606bfebdeSXin LI	NOTE: If you use the --with-ada-sharedlib option, you should also
98706bfebdeSXin LI	set this option, to ensure that C-language modules needed for the
98806bfebdeSXin LI	Ada binding use appropriate compiler options.
98906bfebdeSXin LI
99018259542SPeter Wemm    --with-shlib-version=XXX
99118259542SPeter Wemm	Specify whether to use the release or ABI version for shared libraries.
99218259542SPeter Wemm	This is normally chosen automatically based on the type of system
99318259542SPeter Wemm	which you are building on.  We use it for testing the configure script.
99418259542SPeter Wemm
9954a1a9510SRong-En Fan    --with-sysmouse
9964a1a9510SRong-En Fan	use FreeBSD sysmouse interface provide mouse support on the console.
9974a1a9510SRong-En Fan
99818259542SPeter Wemm    --with-system-type=XXX
99918259542SPeter Wemm	For testing, override the derived host system-type which is used to
100018259542SPeter Wemm	decide things such as the linker commands used to build shared
100118259542SPeter Wemm	libraries.  This is normally chosen automatically based on the type of
100218259542SPeter Wemm	system which you are building on.  We use it for testing the configure
100318259542SPeter Wemm	script.
100418259542SPeter Wemm
100518259542SPeter Wemm    --with-terminfo-dirs=XXX
100618259542SPeter Wemm	Specify a search-list of terminfo directories which will be compiled
100718259542SPeter Wemm	into the ncurses library (default: DATADIR/terminfo)
100818259542SPeter Wemm
10094a1a9510SRong-En Fan    --with-termlib[=XXX]
101018259542SPeter Wemm	When building the ncurses library, organize this as two parts:  the
101118259542SPeter Wemm	curses library (libncurses) and the low-level terminfo library
101218259542SPeter Wemm	(libtinfo).  This is done to accommodate applications that use only
101318259542SPeter Wemm	the latter.  The terminfo library is about half the size of the total.
101418259542SPeter Wemm
10154a1a9510SRong-En Fan	If an option value is given, that overrides the name of the terminfo
10164a1a9510SRong-En Fan	library.  For instance, if the wide-character version is built, the
10174a1a9510SRong-En Fan	terminfo library would be named libtinfow.  But the libtinfow interface
10184a1a9510SRong-En Fan	is upward compatible from libtinfo, so it would be possible to overlay
10194a1a9510SRong-En Fan	libtinfo.so with a "wide" version of libtinfow.so by renaming it with
10204a1a9510SRong-En Fan	this option.
10214a1a9510SRong-En Fan
102239f2269fSPeter Wemm    --with-termpath=XXX
102339f2269fSPeter Wemm	Specify a search-list of termcap files which will be compiled into the
102439f2269fSPeter Wemm	ncurses library (default:  /etc/termcap:/usr/share/misc/termcap)
102539f2269fSPeter Wemm
10265ca44d1cSRong-En Fan    --with-ticlib[=XXX]
10275ca44d1cSRong-En Fan	When building the ncurses library, build a separate library for
10285ca44d1cSRong-En Fan	the modules that are used only by the utility programs.  Normally
10295ca44d1cSRong-En Fan	those would be bundled with the termlib or ncurses libraries.
10305ca44d1cSRong-En Fan
10315ca44d1cSRong-En Fan	If an option value is given, that overrides the name of the tic
10325ca44d1cSRong-En Fan	library.  As in termlib, there is no ABI difference between the
10335ca44d1cSRong-En Fan	"wide" libticw.so and libtic.so
10345ca44d1cSRong-En Fan
10355d08fb1fSRong-En Fan	NOTE: Overriding the name of the tic library may be useful if you are
10365d08fb1fSRong-En Fan	also using the --with-termlib option to rename libtinfo.  If you are
10375d08fb1fSRong-En Fan	not doing that, renaming the tic library can result in conflicting
10385d08fb1fSRong-En Fan	library dependencies for tic and other programs built with the tic
10395d08fb1fSRong-En Fan	library.
10405d08fb1fSRong-En Fan
1041*73f0a83dSXin LI    --with-tparm-arg[=XXX]
1042*73f0a83dSXin LI	Override the type used for tparm() arguments, which normally is a
1043*73f0a83dSXin LI	"long".  However the function must assume that its arguments can hold a
1044*73f0a83dSXin LI	pointer to char's which is not always workable for 64-bit platforms.  A
1045*73f0a83dSXin LI	better choice would be intptr_t, which was not available at the time
1046*73f0a83dSXin LI	tparm's interface was defined.
1047*73f0a83dSXin LI
1048*73f0a83dSXin LI	If the option is not given, this defaults to "long".
1049*73f0a83dSXin LI
10504a1a9510SRong-En Fan    --with-trace
10514a1a9510SRong-En Fan	Configure the trace() function as part of the all models of the ncurses
10524a1a9510SRong-En Fan	library.  Normally it is part of the debug (libncurses_g) library only.
10534a1a9510SRong-En Fan
1054*73f0a83dSXin LI    --with-xterm-kbs=XXX
1055*73f0a83dSXin LI	Configure xterm's terminfo entries to use either BS (^H, i.e., ASCII
1056*73f0a83dSXin LI	backspace) or DEL (^?, or 127).  XXX can be BS (or bs, 8) or DEL
1057*73f0a83dSXin LI	(or del, 127).
1058*73f0a83dSXin LI
1059*73f0a83dSXin LI	During installation, the makefile and scripts modifies the "xterm+kbs"
1060*73f0a83dSXin LI	terminfo entry to use this setting.
1061*73f0a83dSXin LI
10624a1a9510SRong-En Fan    --with-valgrind
10634a1a9510SRong-En Fan	For testing, compile with debug option.
10644a1a9510SRong-En Fan	This also sets the --disable-leaks option.
10654a1a9510SRong-En Fan
106606bfebdeSXin LI    --with-wrap-prefix=XXX
106706bfebdeSXin LI	When using the --enable-reentrant option, ncurses redefines variables
106806bfebdeSXin LI	that would be global in curses, e.g., LINES, as a macro that calls a
106906bfebdeSXin LI	"wrapping" function which fetches the data from the current SCREEN
107006bfebdeSXin LI	structure.  Normally that function is named by prepending "_nc_" to the
107106bfebdeSXin LI	variable's name.  The function is technically private (since portable
107206bfebdeSXin LI	applications would not refer directly to it).  But according to one
107306bfebdeSXin LI	line of reasoning, it is not the same type of "private" as functions
107406bfebdeSXin LI	which applications should not call even via a macro.  This configure
107506bfebdeSXin LI	option lets you choose the prefix for these wrapped variables.
107606bfebdeSXin LI
107718259542SPeter Wemm    --without-ada
107818259542SPeter Wemm	Suppress the configure script's check for Ada95, do not build the
107918259542SPeter Wemm	Ada95 binding and related demo.
108018259542SPeter Wemm
10817a69bbfbSPeter Wemm    --without-curses-h
10827a69bbfbSPeter Wemm	Don't install the ncurses header with the name "curses.h".  Rather,
10837a69bbfbSPeter Wemm	install as "ncurses.h" and modify the installed headers and manpages
10847a69bbfbSPeter Wemm	accordingly.
10857a69bbfbSPeter Wemm
1086*73f0a83dSXin LI	Likewise, do not install an alias "curses" for the ncurses manpage.
1087*73f0a83dSXin LI
108818259542SPeter Wemm    --without-cxx
108918259542SPeter Wemm	XSI curses declares "bool" as part of the interface.  C++ also declares
109018259542SPeter Wemm	"bool".  Neither specifies the size and type of booleans, but both
109118259542SPeter Wemm	insist on the same name.  We chose to accommodate this by making the
109218259542SPeter Wemm	configure script check for the size and type (e.g., unsigned or signed)
109318259542SPeter Wemm	that your C++ compiler uses for booleans.  If you do not wish to use
109418259542SPeter Wemm	ncurses with C++, use this option to tell the configure script to not
109518259542SPeter Wemm	adjust ncurses bool to match C++.
109618259542SPeter Wemm
109718259542SPeter Wemm    --without-cxx-binding
109818259542SPeter Wemm	Suppress the configure script's check for C++, do not build the
109918259542SPeter Wemm	C++ binding and related demo.
110018259542SPeter Wemm
11014a1a9510SRong-En Fan    --without-develop
11024a1a9510SRong-En Fan	Disable development options.  This does not include those that change
11034a1a9510SRong-En Fan	the interface, such as --enable-widec.
11044a1a9510SRong-En Fan
11054a1a9510SRong-En Fan    --without-dlsym
11064a1a9510SRong-En Fan	Do not use dlsym() to load GPM dynamically.
11074a1a9510SRong-En Fan
110806bfebdeSXin LI    --without-manpages
110906bfebdeSXin LI	Tell the configure script to suppress the install of ncurses' manpages.
111006bfebdeSXin LI
111118259542SPeter Wemm    --without-progs
111218259542SPeter Wemm	Tell the configure script to suppress the build of ncurses' application
111318259542SPeter Wemm	programs (e.g., tic).  The test applications will still be built if you
111418259542SPeter Wemm	type "make", though not if you simply do "make install".
111518259542SPeter Wemm
111606bfebdeSXin LI    --without-tests
111706bfebdeSXin LI	Tell the configure script to suppress the build of ncurses' test
111806bfebdeSXin LI	programs.
111906bfebdeSXin LI
11204a1a9510SRong-En Fan    --without-xterm-new
11214a1a9510SRong-En Fan	Tell the configure script to use "xterm-old" for the entry used in
11224a1a9510SRong-En Fan	the terminfo database.  This will work with variations such as
11234a1a9510SRong-En Fan	X11R5 and X11R6 xterm.
11244a1a9510SRong-En Fan
112518259542SPeter Wemm
112615589c42SPeter WemmCOMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
112715589c42SPeter Wemm--------------------------------------------
112815589c42SPeter Wemm
112915589c42SPeter Wemm    Because ncurses implements the X/Open Curses Specification, its interface
113015589c42SPeter Wemm    is fairly stable.  That does not mean the interface does not change.
113115589c42SPeter Wemm    Changes are made to the documented interfaces when we find differences
113215589c42SPeter Wemm    between ncurses and X/Open or implementations which they certify (such as
113315589c42SPeter Wemm    Solaris).  We add extensions to those interfaces to solve problems not
113415589c42SPeter Wemm    addressed by the original curses design, but those must not conflict with
113515589c42SPeter Wemm    the X/Open documentation.
113615589c42SPeter Wemm
113715589c42SPeter Wemm    Here are some of the major interface changes, and related problems which
113815589c42SPeter Wemm    you may encounter when building a system with different versions of
113915589c42SPeter Wemm    ncurses:
114015589c42SPeter Wemm
114106bfebdeSXin LI    5.8 (Feb 26, 2011)
114206bfebdeSXin LI	Interface changes:
114306bfebdeSXin LI
114406bfebdeSXin LI	+ add an alternate library configuration, i.e., "terminal driver" to
114506bfebdeSXin LI	  support port to Windows, built with MinGW.  There are two drivers
114606bfebdeSXin LI	  (terminfo and Windows console).  The terminfo driver works on other
114706bfebdeSXin LI	  platforms.
114806bfebdeSXin LI
114906bfebdeSXin LI	+ add a new set of functions which accept a SCREEN* parameter, in
115006bfebdeSXin LI	  contrast with the original set which use the global value "sp".
115106bfebdeSXin LI	  By default, these names end with "_sp", and are otherwise
115206bfebdeSXin LI	  functionally identical with the originals.
115306bfebdeSXin LI
115406bfebdeSXin LI	  In addition to the "_sp" functions, there are a few new functions
115506bfebdeSXin LI	  associated with this feature:  ceiling_panel, ground_panel,
115606bfebdeSXin LI	  new_prescr.
115706bfebdeSXin LI
115806bfebdeSXin LI	  If the library is not built with the sp-funcs extension, there
115906bfebdeSXin LI	  are no related interface changes.
116006bfebdeSXin LI
116106bfebdeSXin LI	+ add tiparm function based on review of X/Open Curses Issue 7.
116206bfebdeSXin LI
116306bfebdeSXin LI	+ change internal _nc_has_mouse function to public has_mouse function
116406bfebdeSXin LI
116506bfebdeSXin LI	Added extensions:
116606bfebdeSXin LI
116706bfebdeSXin LI	+ add a few more functions to support the NCURSES_OPAQUE feature:
116806bfebdeSXin LI	  get_escdelay, is_pad, is_subwin
116906bfebdeSXin LI
117006bfebdeSXin LI	Added internal functions (other than "_sp" variants):
117106bfebdeSXin LI		_nc_curscr_of
117206bfebdeSXin LI		_nc_format_slks
117306bfebdeSXin LI		_nc_get_alias_table
117406bfebdeSXin LI		_nc_get_hash_info
117506bfebdeSXin LI		_nc_insert_wch
117606bfebdeSXin LI		_nc_newscr_of
117706bfebdeSXin LI		_nc_outc_wrapper
117806bfebdeSXin LI		_nc_retrace_char
117906bfebdeSXin LI		_nc_retrace_int_attr_t
118006bfebdeSXin LI		_nc_retrace_mmask_t
118106bfebdeSXin LI		_nc_setup_tinfo
118206bfebdeSXin LI		_nc_stdscr_of
118306bfebdeSXin LI		_nc_tinfo_cmdch
118406bfebdeSXin LI
118506bfebdeSXin LI	Removed internal functions:
118606bfebdeSXin LI		_nc_makenew (some configurations replace by _nc_makenew_sp)
118706bfebdeSXin LI
118806bfebdeSXin LI	Modified internal functions:
118906bfebdeSXin LI		_nc_UpdateAttrs
119006bfebdeSXin LI		_nc_get_hash_table
119106bfebdeSXin LI		_nc_has_mouse
119206bfebdeSXin LI		_nc_insert_ch
119306bfebdeSXin LI		_nc_wgetch
119406bfebdeSXin LI
11955d08fb1fSRong-En Fan    5.7 (November 2, 2008)
11965d08fb1fSRong-En Fan	Interface changes:
11975d08fb1fSRong-En Fan
11985d08fb1fSRong-En Fan	+ generate linkable stubs for some macros:
11995d08fb1fSRong-En Fan		getattrs
12005d08fb1fSRong-En Fan
12015d08fb1fSRong-En Fan	+ Add new library configuration for tic-library (the non-curses portion
12025d08fb1fSRong-En Fan	  of the ncurses library used for the tic program as well as some
12035d08fb1fSRong-En Fan	  others such as tack.  There is no API change, but makefiles would be
12045d08fb1fSRong-En Fan	  changed to use the tic-library built separately.
12055d08fb1fSRong-En Fan
12065d08fb1fSRong-En Fan	  tack, distributed separately from ncurses, uses some of the internal
12075d08fb1fSRong-En Fan	  _nc_XXX functions, which are declared in the tic.h header file.
12085d08fb1fSRong-En Fan
12095d08fb1fSRong-En Fan	  The reason for providing this separate library is that none of the
12105d08fb1fSRong-En Fan	  functions in it are suitable for threaded applications.
12115d08fb1fSRong-En Fan
12125d08fb1fSRong-En Fan	+ Add new library configuration (ncursest, ncurseswt) which provides
12135d08fb1fSRong-En Fan	  rudimentary support for POSIX threads.  This introduces opaque
12145d08fb1fSRong-En Fan	  access functions to the WINDOW structure and adds a parameter to
12155d08fb1fSRong-En Fan	  several internal functions.
12165d08fb1fSRong-En Fan
12175d08fb1fSRong-En Fan	+ move most internal variables (except tic-library) into data blocks
12185d08fb1fSRong-En Fan	  _nc_globals and _nc_prescreen to simplify analysis.  Those were
12195d08fb1fSRong-En Fan	  globally accessible, but since they were not part of the documented
12205d08fb1fSRong-En Fan	  API, there is no ABI change.
12215d08fb1fSRong-En Fan
12225d08fb1fSRong-En Fan	+ changed static tables of strings to be indices into long strings, to
12235d08fb1fSRong-En Fan	  improve startup performance.  This changes parameter lists for some
12245d08fb1fSRong-En Fan	  of the internal functions.
12255d08fb1fSRong-En Fan
12265d08fb1fSRong-En Fan	Added extensions:
12275d08fb1fSRong-En Fan
12285d08fb1fSRong-En Fan	+ add NCURSES_OPAQUE definition in curses.h to control whether internal
12295d08fb1fSRong-En Fan	  details of the WINDOW structure are visible to an application.  This
12305d08fb1fSRong-En Fan	  is always defined when the threaded library is built, and is optional
12315d08fb1fSRong-En Fan	  otherwise.  New functions for this:  is_cleared, is_idcok, is_idlok,
12325d08fb1fSRong-En Fan	  is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout,
12335d08fb1fSRong-En Fan	  is_scrollok, is_syncok, wgetparent and wgetscrreg.
12345d08fb1fSRong-En Fan
12355d08fb1fSRong-En Fan	+ the threaded library (ncursest) also disallows direct updating of
12365d08fb1fSRong-En Fan	  global curses-level variables, providing functions (via macros) for
12375d08fb1fSRong-En Fan	  obtaining their value.  A few of those variables can be modified by
12385d08fb1fSRong-En Fan	  the application, using new functions:  set_escdelay, set_tabsize
12395d08fb1fSRong-En Fan
12405d08fb1fSRong-En Fan	+ added functions use_window() and use_screen() which wrap a mutex
12415d08fb1fSRong-En Fan	  (if threading is configured) around a call to a user-supplied
12425d08fb1fSRong-En Fan	  function.
12435d08fb1fSRong-En Fan
12445d08fb1fSRong-En Fan	Added internal functions:
12455d08fb1fSRong-En Fan		_nc_get_alias_table
12465d08fb1fSRong-En Fan		_nc_get_screensize
12475d08fb1fSRong-En Fan		_nc_keyname
12485d08fb1fSRong-En Fan		_nc_screen_of
12495d08fb1fSRong-En Fan		_nc_set_no_padding
12505d08fb1fSRong-En Fan		_nc_tracechar
12515d08fb1fSRong-En Fan		_nc_tracemouse
12525d08fb1fSRong-En Fan		_nc_unctrl
12535d08fb1fSRong-En Fan		_nc_ungetch
12545d08fb1fSRong-En Fan
12555d08fb1fSRong-En Fan		These are used for leak-testing, and are stubs for
12565d08fb1fSRong-En Fan		ABI compatibility when ncurses is not configured for that
12575d08fb1fSRong-En Fan		using the --disable-leaks configure script option:
12585d08fb1fSRong-En Fan
12595d08fb1fSRong-En Fan		_nc_free_and_exit
12605d08fb1fSRong-En Fan		_nc_leaks_tinfo
12615d08fb1fSRong-En Fan
12625d08fb1fSRong-En Fan	Removed internal functions:
12635d08fb1fSRong-En Fan		none
12645d08fb1fSRong-En Fan
12655d08fb1fSRong-En Fan	Modified internal functions:
12665d08fb1fSRong-En Fan		_nc_fifo_dump
12675d08fb1fSRong-En Fan		_nc_find_entry
12685d08fb1fSRong-En Fan		_nc_handle_sigwinch
12695d08fb1fSRong-En Fan		_nc_init_keytry
12705d08fb1fSRong-En Fan		_nc_keypad
12715d08fb1fSRong-En Fan		_nc_locale_breaks_acs
12725d08fb1fSRong-En Fan		_nc_timed_wait
12735d08fb1fSRong-En Fan		_nc_update_screensize
12745d08fb1fSRong-En Fan
12755d08fb1fSRong-En Fan		Use new typedef TRIES to replace "struct tries":
12765d08fb1fSRong-En Fan
12775d08fb1fSRong-En Fan		_nc_add_to_try
12785d08fb1fSRong-En Fan		_nc_expand_try
12795d08fb1fSRong-En Fan		_nc_remove_key
12805d08fb1fSRong-En Fan		_nc_remove_string
12815d08fb1fSRong-En Fan		_nc_trace_tries
12825d08fb1fSRong-En Fan
12834a1a9510SRong-En Fan    5.6 (December 17, 2006)
12844a1a9510SRong-En Fan	Interface changes:
12854a1a9510SRong-En Fan
12864a1a9510SRong-En Fan	+ generate linkable stubs for some macros:
12874a1a9510SRong-En Fan
12884a1a9510SRong-En Fan	  getbegx, getbegy, getcurx, getcury, getmaxx, getmaxy, getparx,
12894a1a9510SRong-En Fan	  getpary, getpary,
12904a1a9510SRong-En Fan
12914a1a9510SRong-En Fan	  and (for libncursesw)
12924a1a9510SRong-En Fan
12934a1a9510SRong-En Fan	  wgetbkgrnd
12944a1a9510SRong-En Fan
12954a1a9510SRong-En Fan	Added extensions:
12964a1a9510SRong-En Fan		nofilter()
12974a1a9510SRong-En Fan		use_legacy_coding()
12984a1a9510SRong-En Fan
12994a1a9510SRong-En Fan	Added internal functions:
13004a1a9510SRong-En Fan		_nc_first_db
13014a1a9510SRong-En Fan		_nc_get_source
13024a1a9510SRong-En Fan		_nc_handle_sigwinch
13034a1a9510SRong-En Fan		_nc_is_abs_path
13044a1a9510SRong-En Fan		_nc_is_dir_path
13054a1a9510SRong-En Fan		_nc_is_file_path
13064a1a9510SRong-En Fan		_nc_keep_tic_dir
13074a1a9510SRong-En Fan		_nc_keep_tic_dir
13084a1a9510SRong-En Fan		_nc_last_db
13094a1a9510SRong-En Fan		_nc_next_db
13104a1a9510SRong-En Fan		_nc_read_termtype
13114a1a9510SRong-En Fan		_nc_tic_dir
13124a1a9510SRong-En Fan
13134a1a9510SRong-En Fan		Also (if using the hashed database configuration):
13144a1a9510SRong-En Fan
13154a1a9510SRong-En Fan		_nc_db_close
13164a1a9510SRong-En Fan		_nc_db_first
13174a1a9510SRong-En Fan		_nc_db_get
13184a1a9510SRong-En Fan		_nc_db_have_data
13194a1a9510SRong-En Fan		_nc_db_have_index
13204a1a9510SRong-En Fan		_nc_db_next
13214a1a9510SRong-En Fan		_nc_db_open
13224a1a9510SRong-En Fan		_nc_db_put
13234a1a9510SRong-En Fan
13244a1a9510SRong-En Fan		otherwise
13254a1a9510SRong-En Fan
13264a1a9510SRong-En Fan		_nc_hashed_db
13274a1a9510SRong-En Fan
13284a1a9510SRong-En Fan	Removed internal functions:
13294a1a9510SRong-En Fan		none
13304a1a9510SRong-En Fan
13314a1a9510SRong-En Fan	Modified internal functions:
13324a1a9510SRong-En Fan		_nc_add_to_try
13334a1a9510SRong-En Fan		_nc_do_color
13344a1a9510SRong-En Fan		_nc_expand_try
13354a1a9510SRong-En Fan		_nc_remove_key
13364a1a9510SRong-En Fan		_nc_setupscreen
13374a1a9510SRong-En Fan
13384a1a9510SRong-En Fan    5.5 (October 10, 2005)
13394a1a9510SRong-En Fan	Interface changes:
13404a1a9510SRong-En Fan
13414a1a9510SRong-En Fan	+ terminfo installs "xterm-new" as "xterm" entry rather than
13424a1a9510SRong-En Fan	  "xterm-old" (aka xterm-r6).
13434a1a9510SRong-En Fan
13444a1a9510SRong-En Fan	+ terminfo data is installed using the tic -x option (few systems
13454a1a9510SRong-En Fan	  still use ncurses 4.2).
13464a1a9510SRong-En Fan
13474a1a9510SRong-En Fan	+ modify C++ binding to work with newer C++ compilers by providing
13484a1a9510SRong-En Fan	  initializers and using modern casts.  Old-style header names are
13494a1a9510SRong-En Fan	  still used in this release to allow compiling with not-so-old
13504a1a9510SRong-En Fan	  compilers.
13514a1a9510SRong-En Fan
13524a1a9510SRong-En Fan	+ form and menu libraries now work with wide-character data.
13534a1a9510SRong-En Fan	  Applications which bypassed the form library and manipulated the
13544a1a9510SRong-En Fan	  FIELD.buf data directly will not work properly with libformw, since
13554a1a9510SRong-En Fan	  that no longer points to an array of char.  The set_field_buffer()
13564a1a9510SRong-En Fan	  and field_buffer() functions translate to/from the actual field
13574a1a9510SRong-En Fan	  data.
13584a1a9510SRong-En Fan
13594a1a9510SRong-En Fan	+ change SP->_current_attr to a pointer, adjust ifdef's to ensure that
13604a1a9510SRong-En Fan	  libtinfo.so and libtinfow.so have the same ABI.  The reason for this
13614a1a9510SRong-En Fan	  is that the corresponding data which belongs to the upper-level
13624a1a9510SRong-En Fan	  ncurses library has a different size in each model.
13634a1a9510SRong-En Fan
13644a1a9510SRong-En Fan	+ winnstr() now returns multibyte character strings for the
13654a1a9510SRong-En Fan	  wide-character configuration.
13664a1a9510SRong-En Fan
13674a1a9510SRong-En Fan	+ assume_default_colors() no longer requires that use_default_colors()
13684a1a9510SRong-En Fan	  be called first.
13694a1a9510SRong-En Fan
13704a1a9510SRong-En Fan	+ data_ahead() now works with wide-characters.
13714a1a9510SRong-En Fan
13724a1a9510SRong-En Fan	+ slk_set() and slk_wset() now accept and store multibyte or
13734a1a9510SRong-En Fan	  multicolumn characters.
13744a1a9510SRong-En Fan
13754a1a9510SRong-En Fan	+ start_color() now returns OK if colors have already been started.
13764a1a9510SRong-En Fan	  start_color() also returns ERR if it cannot allocate memory.
13774a1a9510SRong-En Fan
13784a1a9510SRong-En Fan	+ pair_content() now returns -1 for consistency with init_pair() if it
13794a1a9510SRong-En Fan	  corresponds to the default-color.
13804a1a9510SRong-En Fan
13814a1a9510SRong-En Fan	+ unctrl() now returns null if its parameter does not correspond
13824a1a9510SRong-En Fan	  to an unsigned char.
13834a1a9510SRong-En Fan
13844a1a9510SRong-En Fan	Added extensions:
13854a1a9510SRong-En Fan		Experimental mouse version 2 supports wheel mice with buttons
13864a1a9510SRong-En Fan		4 and 5.  This requires ABI 6 because it modifies the encoding
13874a1a9510SRong-En Fan		of mouse events.
13884a1a9510SRong-En Fan
13894a1a9510SRong-En Fan		Experimental extended colors allows encoding of 256 foreground
13904a1a9510SRong-En Fan		and background colors, e.g., with the xterm-256color or
13914a1a9510SRong-En Fan		xterm-88color terminfo entries.  This requires ABI 6 because
13924a1a9510SRong-En Fan		it changes the size of cchar_t.
13934a1a9510SRong-En Fan
13944a1a9510SRong-En Fan	Added internal functions:
13954a1a9510SRong-En Fan		_nc_check_termtype2
13964a1a9510SRong-En Fan		_nc_resolve_uses2
13974a1a9510SRong-En Fan		_nc_retrace_cptr
13984a1a9510SRong-En Fan		_nc_retrace_cvoid_ptr
13994a1a9510SRong-En Fan		_nc_retrace_void_ptr
14004a1a9510SRong-En Fan		_nc_setup_term
14014a1a9510SRong-En Fan
14024a1a9510SRong-En Fan	Removed internal functions:
14034a1a9510SRong-En Fan		none
14044a1a9510SRong-En Fan
14054a1a9510SRong-En Fan	Modified internal functions:
14064a1a9510SRong-En Fan		_nc_insert_ch
14074a1a9510SRong-En Fan		_nc_save_str
14084a1a9510SRong-En Fan		_nc_trans_string
14094a1a9510SRong-En Fan
14104a1a9510SRong-En Fan    5.4 (February 8, 2004)
14114a1a9510SRong-En Fan	Interface changes:
14124a1a9510SRong-En Fan
14134a1a9510SRong-En Fan	+ add the remaining functions for X/Open curses wide-character support.
14144a1a9510SRong-En Fan	  These are only available if the library is configured using the
14154a1a9510SRong-En Fan	  --enable-widec option.
14164a1a9510SRong-En Fan		pecho_wchar()
14174a1a9510SRong-En Fan		slk_wset()
14184a1a9510SRong-En Fan
14194a1a9510SRong-En Fan	+ write getyx() and related 2-return macros in terms of getcury(),
14204a1a9510SRong-En Fan	  getcurx(), etc.
14214a1a9510SRong-En Fan
14224a1a9510SRong-En Fan	+ simplify ifdef for bool declaration in curses.h
14234a1a9510SRong-En Fan
14244a1a9510SRong-En Fan	+ modify ifdef's in curses.h that disabled use of __attribute__() for
14254a1a9510SRong-En Fan	  g++, since recent versions implement the cases which ncurses uses.
14264a1a9510SRong-En Fan
14274a1a9510SRong-En Fan	+ change some interfaces to use const:
14284a1a9510SRong-En Fan		define_key()
14294a1a9510SRong-En Fan		mvprintw()
14304a1a9510SRong-En Fan		mvwprintw()
14314a1a9510SRong-En Fan		printw()
14324a1a9510SRong-En Fan		vw_printw()
14334a1a9510SRong-En Fan		winsnstr()
14344a1a9510SRong-En Fan		wprintw()
14354a1a9510SRong-En Fan
14364a1a9510SRong-En Fan	Added extensions:
14374a1a9510SRong-En Fan		key_defined()
14384a1a9510SRong-En Fan
14394a1a9510SRong-En Fan	Added internal functions:
14404a1a9510SRong-En Fan		_nc_get_locale()
14414a1a9510SRong-En Fan		_nc_insert_ch()
14424a1a9510SRong-En Fan		_nc_is_charable()	wide
14434a1a9510SRong-En Fan		_nc_locale_breaks_acs()
14444a1a9510SRong-En Fan		_nc_pathlast()
14454a1a9510SRong-En Fan		_nc_to_char()		wide
14464a1a9510SRong-En Fan		_nc_to_widechar()	wide
14474a1a9510SRong-En Fan		_nc_tparm_analyze()
14484a1a9510SRong-En Fan		_nc_trace_bufcat()	debug
14494a1a9510SRong-En Fan		_nc_unicode_locale()
14504a1a9510SRong-En Fan
14514a1a9510SRong-En Fan	Removed internal functions:
14524a1a9510SRong-En Fan		_nc_outstr()
14534a1a9510SRong-En Fan		_nc_sigaction()
14544a1a9510SRong-En Fan
14554a1a9510SRong-En Fan	Modified internal functions:
14564a1a9510SRong-En Fan		_nc_remove_string()
14574a1a9510SRong-En Fan		_nc_retrace_chtype()
14584a1a9510SRong-En Fan
14594a1a9510SRong-En Fan    5.3 (October 12, 2002)
14604a1a9510SRong-En Fan	Interface changes:
14614a1a9510SRong-En Fan
14624a1a9510SRong-En Fan	+ change type for bool used in headers to NCURSES_BOOL, which usually
14634a1a9510SRong-En Fan	  is the same as the compiler's definition for 'bool'.
14644a1a9510SRong-En Fan
14654a1a9510SRong-En Fan	+ add all but two functions for X/Open curses wide-character support.
14664a1a9510SRong-En Fan	  These are only available if the library is configured using the
14674a1a9510SRong-En Fan	  --enable-widec option.  Missing functions are
14684a1a9510SRong-En Fan		pecho_wchar()
14694a1a9510SRong-En Fan		slk_wset()
14704a1a9510SRong-En Fan
14714a1a9510SRong-En Fan	+ add environment variable $NCURSES_ASSUMED_COLORS to modify the
14724a1a9510SRong-En Fan	  assume_default_colors() extension.
14734a1a9510SRong-En Fan
14744a1a9510SRong-En Fan	Added extensions:
14754a1a9510SRong-En Fan		is_term_resized()
14764a1a9510SRong-En Fan		resize_term()
14774a1a9510SRong-En Fan
14784a1a9510SRong-En Fan	Added internal functions:
14794a1a9510SRong-En Fan		_nc_altcharset_name()	debug
14804a1a9510SRong-En Fan		_nc_reset_colors()
14814a1a9510SRong-En Fan		_nc_retrace_bool()	debug
14824a1a9510SRong-En Fan		_nc_retrace_unsigned()	debug
14834a1a9510SRong-En Fan		_nc_rootname()
14844a1a9510SRong-En Fan		_nc_trace_ttymode()	debug
14854a1a9510SRong-En Fan		_nc_varargs()		debug
14864a1a9510SRong-En Fan		_nc_visbufn()		debug
14874a1a9510SRong-En Fan		_nc_wgetch()
14884a1a9510SRong-En Fan
14894a1a9510SRong-En Fan	Removed internal functions:
14904a1a9510SRong-En Fan		_nc_background()
14914a1a9510SRong-En Fan
14924a1a9510SRong-En Fan	Modified internal functions:
14934a1a9510SRong-En Fan		_nc_freeall()		debug
14944a1a9510SRong-En Fan
14957a69bbfbSPeter Wemm    5.2 (October 21, 2000)
14967a69bbfbSPeter Wemm	Interface changes:
14977a69bbfbSPeter Wemm
14987a69bbfbSPeter Wemm	+ revert termcap ospeed variable to 'short' (see discussion of the
14997a69bbfbSPeter Wemm	  --with-ospeed configure option).
15007a69bbfbSPeter Wemm
150118259542SPeter Wemm    5.1 (July 8, 2000)
150218259542SPeter Wemm	Interface changes:
150318259542SPeter Wemm
150418259542SPeter Wemm	+ made the extended terminal capabilities
150518259542SPeter Wemm	  (configure --enable-tcap-names) a standard feature.  This should
150618259542SPeter Wemm	  be transparent to applications that do not require it.
150718259542SPeter Wemm
150818259542SPeter Wemm	+ removed the trace() function and related trace support from the
150918259542SPeter Wemm	  production library.
151018259542SPeter Wemm
151118259542SPeter Wemm	+ modified curses.h.in, undef'ing some symbols to avoid conflict
151218259542SPeter Wemm	  with C++ STL.
151318259542SPeter Wemm
151418259542SPeter Wemm	Added extensions:  assume_default_colors().
151518259542SPeter Wemm
151618259542SPeter Wemm    5.0 (October 23, 1999)
151715589c42SPeter Wemm	Interface changes:
151815589c42SPeter Wemm
151915589c42SPeter Wemm	+ implemented the wcolor_set() and slk_color() functions.
152015589c42SPeter Wemm
152115589c42SPeter Wemm	+ move macro winch to a function, to hide details of struct ldat
152215589c42SPeter Wemm
152315589c42SPeter Wemm	+ corrected prototypes for slk_* functions, using chtype rather than
152415589c42SPeter Wemm	  attr_t.
152515589c42SPeter Wemm
152615589c42SPeter Wemm	+ the slk_attr_{set,off,on} functions need an additional void*
152715589c42SPeter Wemm	  parameter according to XSI.
152815589c42SPeter Wemm
152915589c42SPeter Wemm	+ modified several prototypes to correspond with 1997 version of X/Open
153015589c42SPeter Wemm	  Curses:  [w]attr_get(), [w]attr_set(), border_set() have different
153115589c42SPeter Wemm	  parameters.  Some functions were renamed or misspelled:
153215589c42SPeter Wemm	  erase_wchar(), in_wchntr(), mvin_wchntr().  Some developers have used
153315589c42SPeter Wemm	  attr_get().
153415589c42SPeter Wemm
153515589c42SPeter Wemm	Added extensions:  keybound(), curses_version().
153615589c42SPeter Wemm
153715589c42SPeter Wemm	Terminfo database changes:
153815589c42SPeter Wemm
153915589c42SPeter Wemm	+ change translation for termcap 'rs' to terminfo 'rs2', which is
154015589c42SPeter Wemm	  the documented equivalent, rather than 'rs1'.
154115589c42SPeter Wemm
154215589c42SPeter Wemm	The problems are subtler in recent releases.
154315589c42SPeter Wemm
154415589c42SPeter Wemm	a) This release provides users with the ability to define their own
154515589c42SPeter Wemm	   terminal capability extensions, like termcap.  To accomplish this,
154615589c42SPeter Wemm	   we redesigned the TERMTYPE struct (in term.h).  Very few
154715589c42SPeter Wemm	   applications use this struct.  They must be recompiled to work with
154815589c42SPeter Wemm	   the 5.0 library.
154915589c42SPeter Wemm
155015589c42SPeter Wemm	a) If you use the extended terminfo names (i.e., you used configure
155115589c42SPeter Wemm	   --enable-tcap-names), the resulting terminfo database can have some
155215589c42SPeter Wemm	   entries which are not readable by older versions of ncurses.  This
155315589c42SPeter Wemm	   is a bug in the older versions:
155415589c42SPeter Wemm
155515589c42SPeter Wemm	   + the terminfo database stores booleans, numbers and strings in
155615589c42SPeter Wemm	     arrays.  The capabilities that are listed in the arrays are
155715589c42SPeter Wemm	     specified by X/Open.  ncurses recognizes a number of obsolete and
155815589c42SPeter Wemm	     extended names which are stored past the end of the specified
155915589c42SPeter Wemm	     entries.
156015589c42SPeter Wemm
156115589c42SPeter Wemm	   + a change to read_entry.c in 951001 made the library do an lseek()
156215589c42SPeter Wemm	     call incorrectly skipping data which is already read from the
156315589c42SPeter Wemm	     string array.  This happens when the number of strings in the
156415589c42SPeter Wemm	     terminfo data file is greater than STRCOUNT, the number of
156515589c42SPeter Wemm	     specified and obsolete or extended strings.
156615589c42SPeter Wemm
156715589c42SPeter Wemm	   + as part of alignment with the X/Open final specification, in the
156815589c42SPeter Wemm	     990109 patch we added two new terminfo capabilities:
156915589c42SPeter Wemm	     set_a_attributes and set_pglen_inch).  This makes the indices for
157015589c42SPeter Wemm	     the obsolete and extended capabilities shift up by 2.
157115589c42SPeter Wemm
157215589c42SPeter Wemm	   + the last two capabilities in the obsolete/extended list are memu
157315589c42SPeter Wemm	     and meml, which are found in most terminfo descriptions for xterm.
157415589c42SPeter Wemm
157515589c42SPeter Wemm	     When trying to read this terminfo entry, the spurious lseek()
157615589c42SPeter Wemm	     causes the library to attempt to read the final portion of the
157715589c42SPeter Wemm	     terminfo data (the text of the string capabilities) 4 characters
157815589c42SPeter Wemm	     past its starting point, and reads 4 characters too few.  The
157915589c42SPeter Wemm	     library rejects the data, and applications are unable to
158015589c42SPeter Wemm	     initialize that terminal type.
158115589c42SPeter Wemm
158215589c42SPeter Wemm	   FIX: remove memu and meml from the xterm description.  They are
158315589c42SPeter Wemm	   obsolete, not used by ncurses.  (It appears that the feature was
158415589c42SPeter Wemm	   added to xterm to make it more like hpterm).
158515589c42SPeter Wemm
158615589c42SPeter Wemm	   This is not a problem if you do not use the -x option of tic to
158715589c42SPeter Wemm	   create a terminfo database with extended names.  Note that the
158815589c42SPeter Wemm	   user-defined terminal capabilities are not affected by this bug,
158915589c42SPeter Wemm	   since they are stored in a table after the older terminfo data ends,
159015589c42SPeter Wemm	   and are invisible to the older libraries.
159115589c42SPeter Wemm
159215589c42SPeter Wemm	c) Some developers did not wish to use the C++ binding, and used the
159315589c42SPeter Wemm	   configure --without-cxx option.  This causes problems if someone
159415589c42SPeter Wemm	   uses the ncurses library from C++ because that configure test
159515589c42SPeter Wemm	   determines the type for C++'s bool and makes ncurses match it, since
159615589c42SPeter Wemm	   both C++ and curses are specified to declare bool.  Calling ncurses
159715589c42SPeter Wemm	   functions with the incorrect type for bool will cause execution
159815589c42SPeter Wemm	   errors.  In 5.0 we added a configure option "--without-cxx-binding"
159915589c42SPeter Wemm	   which controls whether the binding itself is built and installed.
160015589c42SPeter Wemm
160118259542SPeter Wemm    4.2 (March 2, 1998)
160215589c42SPeter Wemm	Interface changes:
160315589c42SPeter Wemm
160415589c42SPeter Wemm	+ correct prototype for termattrs() as per XPG4 version 2.
160515589c42SPeter Wemm
160615589c42SPeter Wemm	+ add placeholder prototypes for color_set(), erasewchar(),
160715589c42SPeter Wemm	  term_attrs(), wcolor_set() as per XPG4 version 2.
160815589c42SPeter Wemm
160915589c42SPeter Wemm	+ add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
161015589c42SPeter Wemm	  SVr4 headers.
161115589c42SPeter Wemm
161215589c42SPeter Wemm	New extensions: keyok() and define_key().
161315589c42SPeter Wemm
161415589c42SPeter Wemm	Terminfo database changes:
161515589c42SPeter Wemm
161615589c42SPeter Wemm	+ corrected definition in curses.h for ACS_LANTERN, which was 'I'
161715589c42SPeter Wemm	  rather than 'i'.
161815589c42SPeter Wemm
161915589c42SPeter Wemm    4.1 (May 15, 1997)
162015589c42SPeter Wemm
162115589c42SPeter Wemm	We added these extensions:  use_default_colors().  Also added
162215589c42SPeter Wemm	configure option --enable-const, to support the use of const where
162315589c42SPeter Wemm	X/Open should have, but did not, specify.
162415589c42SPeter Wemm
162515589c42SPeter Wemm	The terminfo database content changed the representation of color for
162615589c42SPeter Wemm	most entries that use ANSI colors.  SVr4 curses treats the setaf/setab
162715589c42SPeter Wemm	and setf/setb capabilities differently, interchanging the red/blue
162815589c42SPeter Wemm	colors in the latter.
162915589c42SPeter Wemm
163015589c42SPeter Wemm    4.0 (December 24, 1996)
163115589c42SPeter Wemm
163206bfebdeSXin LI	We bumped to version 4.0 because the newly released Linux dynamic
163306bfebdeSXin LI	loader (ld.so.1.8.5) did not load shared libraries whose ABI and REL
163415589c42SPeter Wemm	versions were inconsistent.  At that point, ncurses ABI was 3.4 and the
163515589c42SPeter Wemm	REL was 1.9.9g, so we made them consistent.
163615589c42SPeter Wemm
163715589c42SPeter Wemm    1.9.9g (December 1, 1996)
163815589c42SPeter Wemm
163915589c42SPeter Wemm	This fixed most of the problems with 1.9.9e, and made these interface
164015589c42SPeter Wemm	changes:
164115589c42SPeter Wemm
164215589c42SPeter Wemm	+ remove tparam(), which had been provided for compatibility with
164315589c42SPeter Wemm	  some termcap.  tparm() is standard, and does not conflict with
164415589c42SPeter Wemm	  application's fallback for missing tparam().
164515589c42SPeter Wemm
164615589c42SPeter Wemm	+ turn off hardware echo in initscr().  This changes the sense of the
164715589c42SPeter Wemm	  echo() function, which was initialized to echoing rather than
164815589c42SPeter Wemm	  nonechoing (the latter is specified).  There were several other
164915589c42SPeter Wemm	  corrections to the terminal I/O settings which cause applications to
165015589c42SPeter Wemm	  behave differently.
165115589c42SPeter Wemm
165215589c42SPeter Wemm	+ implemented several functions (such as attr_on()) which were
165315589c42SPeter Wemm	  available only as macros.
165415589c42SPeter Wemm
165515589c42SPeter Wemm	+ corrected several typos in curses.h.in (i.e., the mvXXXX macros).
165615589c42SPeter Wemm
165715589c42SPeter Wemm	+ corrected prototypes for delay_output(),
165815589c42SPeter Wemm	  has_color, immedok() and idcok().
165915589c42SPeter Wemm
166015589c42SPeter Wemm	+ corrected misspelled getbkgd().  Some applications used the
166115589c42SPeter Wemm	  misspelled name.
166215589c42SPeter Wemm
166315589c42SPeter Wemm	+ added _yoffset to WINDOW.  The size of WINDOW does not impact
166415589c42SPeter Wemm	  applications, since they use only pointers to WINDOW structs.
166515589c42SPeter Wemm
166615589c42SPeter Wemm	These changes were made to the terminfo database:
166715589c42SPeter Wemm
166815589c42SPeter Wemm	+ removed boolean 'getm' which was available as an extended name.
166915589c42SPeter Wemm
167015589c42SPeter Wemm	We added these extensions: wresize(), resizeterm(), has_key() and
167115589c42SPeter Wemm	mcprint().
167215589c42SPeter Wemm
167315589c42SPeter Wemm    1.9.9e (March 24, 1996)
167415589c42SPeter Wemm
167515589c42SPeter Wemm	not recommended (a last-minute/untested change left the forms and
167615589c42SPeter Wemm	menus libraries unusable since they do not repaint the screen).
167715589c42SPeter Wemm	Foreground/background colors are combined incorrectly, working properly
167815589c42SPeter Wemm	only on a black background.  When this was released, the X/Open
167915589c42SPeter Wemm	specification was available only in draft form.
168015589c42SPeter Wemm
168115589c42SPeter Wemm	Some applications (such as lxdialog) were "fixed" to work with the
168215589c42SPeter Wemm	incorrect color scheme.
168315589c42SPeter Wemm
168415589c42SPeter Wemm
16850e3d5408SPeter WemmIF YOU ARE A SYSTEM INTEGRATOR:
168615589c42SPeter Wemm------------------------------
16870e3d5408SPeter Wemm
16880e3d5408SPeter Wemm    Configuration and Installation:
16890e3d5408SPeter Wemm
16904a1a9510SRong-En Fan	On platforms where ncurses is assumed to be installed in /usr/lib,
16914a1a9510SRong-En Fan	the configure script uses "/usr" as a default:
16920e3d5408SPeter Wemm
169306bfebdeSXin LI		GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
16944a1a9510SRong-En Fan
16954a1a9510SRong-En Fan	For other platforms, the default is "/usr/local".  See the discussion
16964a1a9510SRong-En Fan	of the "--disable-overwrite" option.
16974a1a9510SRong-En Fan
16984a1a9510SRong-En Fan	The location of the terminfo is set indirectly by the "--datadir"
16994a1a9510SRong-En Fan	configure option, e.g., /usr/share/terminfo, given a datadir of
17004a1a9510SRong-En Fan	/usr/share.  You may want to override this if you are installing
17014a1a9510SRong-En Fan	ncurses libraries in nonstandard locations, but wish to share the
17024a1a9510SRong-En Fan	terminfo database.
17034a1a9510SRong-En Fan
17044a1a9510SRong-En Fan	Normally the ncurses library is configured in a pure-terminfo mode;
17054a1a9510SRong-En Fan	that is, with the --disable-termcap option.  This makes the ncurses
17060e3d5408SPeter Wemm	library smaller and faster.  The ncurses library includes a termcap
17074a1a9510SRong-En Fan	emulation that queries the terminfo database, so even applications that
17084a1a9510SRong-En Fan	use raw termcap to query terminal characteristics will win (providing
17094a1a9510SRong-En Fan	you recompile and relink them!).
17100e3d5408SPeter Wemm
17114a1a9510SRong-En Fan	If you must configure with termcap fallback enabled, you may also wish
17124a1a9510SRong-En Fan	to use the --enable-getcap option.  This speeds up termcap-based
17134a1a9510SRong-En Fan	startups, at the expense of not allowing personal termcap entries to
17144a1a9510SRong-En Fan	reference the terminfo tree.  See comments in
17154a1a9510SRong-En Fan	ncurses/tinfo/read_termcap.c for further details.
17160e3d5408SPeter Wemm
17170e3d5408SPeter Wemm	Note that if you have $TERMCAP set, ncurses will use that value
17180e3d5408SPeter Wemm	to locate termcap data.  In particular, running from xterm will
17190e3d5408SPeter Wemm	set $TERMCAP to the contents of the xterm's termcap entry.
17200e3d5408SPeter Wemm	If ncurses sees that, it will not examine /etc/termcap.
17210e3d5408SPeter Wemm
17220e3d5408SPeter Wemm    Keyboard Mapping:
17230e3d5408SPeter Wemm
17240e3d5408SPeter Wemm	The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48
17250e3d5408SPeter Wemm	reverse-tabulation sequence) rather than ^I.  Here are the loadkeys -d
17260e3d5408SPeter Wemm	mappings that will set this up:
17270e3d5408SPeter Wemm
17280e3d5408SPeter Wemm		keycode	 15 = Tab	      Tab
17290e3d5408SPeter Wemm			alt     keycode  15 = Meta_Tab
17300e3d5408SPeter Wemm			shift	keycode  15 = F26
17310e3d5408SPeter Wemm		string F26 ="\033[Z"
17320e3d5408SPeter Wemm
17330e3d5408SPeter Wemm    Naming the Console Terminal
17340e3d5408SPeter Wemm
17354a1a9510SRong-En Fan	In various systems there has been a practice of designating the system
17364a1a9510SRong-En Fan	console driver type as `console'.  Please do not do this!  It
17374a1a9510SRong-En Fan	complicates peoples' lives, because it can mean that several different
17384a1a9510SRong-En Fan	terminfo entries from different operating systems all logically want to
17394a1a9510SRong-En Fan	be called `console'.
17400e3d5408SPeter Wemm
17410e3d5408SPeter Wemm	Please pick a name unique to your console driver and set that up
17420e3d5408SPeter Wemm	in the /etc/inittab table or local equivalent.  Send the entry to the
17430e3d5408SPeter Wemm	terminfo maintainer (listed in the misc/terminfo file) to be included
17440e3d5408SPeter Wemm	in the terminfo file, if it's not already there.  See the
17450e3d5408SPeter Wemm	term(7) manual page included with this distribution for more on
17460e3d5408SPeter Wemm	conventions for choosing type names.
17470e3d5408SPeter Wemm
17480e3d5408SPeter Wemm	Here are some recommended primary console names:
17490e3d5408SPeter Wemm
17500e3d5408SPeter Wemm		linux	-- Linux console driver
17510e3d5408SPeter Wemm		freebsd	-- FreeBSD
17520e3d5408SPeter Wemm		netbsd	-- NetBSD
17530e3d5408SPeter Wemm		bsdos	-- BSD/OS
17540e3d5408SPeter Wemm
17550e3d5408SPeter Wemm	If you are responsible for integrating ncurses for one of these
175606bfebdeSXin LI	distributions, please either use the recommended name or get back
17570e3d5408SPeter Wemm	to us explaining why you don't want to, so we can work out nomenclature
17580e3d5408SPeter Wemm	that will make users' lives easier rather than harder.
17590e3d5408SPeter Wemm
176015589c42SPeter Wemm
176115589c42SPeter WemmRECENT XTERM VERSIONS:
176215589c42SPeter Wemm---------------------
176315589c42SPeter Wemm
17640e3d5408SPeter Wemm	The terminfo database file included with this distribution assumes you
17654a1a9510SRong-En Fan	are running a modern xterm based on XFree86 (i.e., xterm-new).  The
17664a1a9510SRong-En Fan	earlier X11R6 entry (xterm-r6) and X11R5 entry (xterm-r5) is provided
17674a1a9510SRong-En Fan	as well.  See the --without-xterm-new configure script option if you
17684a1a9510SRong-En Fan	are unable to update your system.
17690e3d5408SPeter Wemm
177015589c42SPeter Wemm
177115589c42SPeter WemmCONFIGURING FALLBACK ENTRIES:
177215589c42SPeter Wemm----------------------------
177315589c42SPeter Wemm
17740e3d5408SPeter Wemm	In order to support operation of ncurses programs before the terminfo
17750e3d5408SPeter Wemm	tree is accessible (that is, in single-user mode or at OS installation
17760e3d5408SPeter Wemm	time) the ncurses library can be compiled to include an array of
17774a1a9510SRong-En Fan	pre-fetched fallback entries.  This must be done on a machine which
177806bfebdeSXin LI	has ncurses' infocmp and terminfo database installed (as well as
177906bfebdeSXin LI	ncurses' tic and infocmp programs).
17800e3d5408SPeter Wemm
17810e3d5408SPeter Wemm	These entries are checked by setupterm() only when the conventional
17820e3d5408SPeter Wemm	fetches from the terminfo tree and the termcap fallback (if configured)
17830e3d5408SPeter Wemm	have been tried and failed.  Thus, the presence of a fallback will not
17840e3d5408SPeter Wemm	shadow modifications to the on-disk entry for the same type, when that
17850e3d5408SPeter Wemm	entry is accessible.
17860e3d5408SPeter Wemm
17874a1a9510SRong-En Fan	By default, there are no entries on the fallback list.  After you have
17884a1a9510SRong-En Fan	built the ncurses suite for the first time, you can change the list
17894a1a9510SRong-En Fan	(the process needs infocmp(1)).  To do so, use the script
1790*73f0a83dSXin LI	ncurses/tinfo/MKfallback.sh.  The configure script option
17914a1a9510SRong-En Fan	--with-fallbacks does this (it accepts a comma-separated list of the
17924a1a9510SRong-En Fan	names you wish, and does not require a rebuild).
17930e3d5408SPeter Wemm
17940e3d5408SPeter Wemm	If you wanted (say) to have linux, vt100, and xterm fallbacks, you
1795*73f0a83dSXin LI	might use the commands
17960e3d5408SPeter Wemm
17970e3d5408SPeter Wemm		cd ncurses;
1798*73f0a83dSXin LI		tinfo/MKfallback.sh \
1799*73f0a83dSXin LI			$TERMINFO \
1800*73f0a83dSXin LI			../misc/terminfo.src \
1801*73f0a83dSXin LI			`which tic` \
1802*73f0a83dSXin LI			linux vt100 xterm >fallback.c
1803*73f0a83dSXin LI
1804*73f0a83dSXin LI	The first three parameters of the script are normally supplied by
1805*73f0a83dSXin LI	the configured makefiles via the "--with-fallbacks" option.  They
1806*73f0a83dSXin LI	are
1807*73f0a83dSXin LI
1808*73f0a83dSXin LI		1) the location of the terminfo database
1809*73f0a83dSXin LI		2) the source for the terminfo entries
1810*73f0a83dSXin LI		3) the location of the tic program, used to create a terminfo
1811*73f0a83dSXin LI		   database.
18120e3d5408SPeter Wemm
18130e3d5408SPeter Wemm	Then just rebuild and reinstall the library as you would normally.
18140e3d5408SPeter Wemm	You can restore the default empty fallback list with
18150e3d5408SPeter Wemm
1816*73f0a83dSXin LI		tinfo/MKfallback.sh \
1817*73f0a83dSXin LI			$TERMINFO \
1818*73f0a83dSXin LI			../misc/terminfo.src \
1819*73f0a83dSXin LI			`which tic` \
1820*73f0a83dSXin LI			>fallback.c
18210e3d5408SPeter Wemm
18220e3d5408SPeter Wemm	The overhead for an empty fallback list is one trivial stub function.
18230e3d5408SPeter Wemm	Any non-empty fallback list is const-ed and therefore lives in sharable
18240e3d5408SPeter Wemm	text space.  You can look at the comment trailing each initializer in
18250e3d5408SPeter Wemm	the generated ncurses/fallback.c file to see the core cost of the
18260e3d5408SPeter Wemm	fallbacks.  A good rule of thumb for modern vt100-like entries is that
18270e3d5408SPeter Wemm	each one will cost about 2.5K of text space.
18280e3d5408SPeter Wemm
182915589c42SPeter Wemm
18300e3d5408SPeter WemmBSD CONVERSION NOTES:
183115589c42SPeter Wemm--------------------
183215589c42SPeter Wemm
18330e3d5408SPeter Wemm	If you need to support really ancient BSD programs, you probably
18340e3d5408SPeter Wemm	want to configure with the --enable-bsdpad option.  What this does
18350e3d5408SPeter Wemm	is enable code in tputs() that recognizes a numeric prefix on a
18360e3d5408SPeter Wemm	capability as a request for that much trailing padding in milliseconds.
18370e3d5408SPeter Wemm	There are old BSD programs that do things like tputs("50").
18380e3d5408SPeter Wemm
18390e3d5408SPeter Wemm	(If you are distributing ncurses as a support-library component of
18400e3d5408SPeter Wemm	an application you probably want to put the remainder of this section
18410e3d5408SPeter Wemm	in the package README file.)
18420e3d5408SPeter Wemm
18430e3d5408SPeter Wemm	The following note applies only if you have configured ncurses with
18440e3d5408SPeter Wemm	--enable-termcap.
18450e3d5408SPeter Wemm
18460e3d5408SPeter Wemm------------------------------- CUT HERE --------------------------------
18470e3d5408SPeter Wemm
18480e3d5408SPeter WemmIf you are installing this application privately (either because you
18490e3d5408SPeter Wemmhave no root access or want to experiment with it before doing a root
18500e3d5408SPeter Wemminstallation), there are a couple of details you need to be aware of.
18510e3d5408SPeter WemmThey have to do with the ncurses library, which uses terminfo rather
18520e3d5408SPeter Wemmthan termcap for describing terminal characteristics.
18530e3d5408SPeter Wemm
18540e3d5408SPeter WemmThough the ncurses library is terminfo-based, it will interpret your
18550e3d5408SPeter WemmTERMCAP variable (if present), any local termcap files you reference
18560e3d5408SPeter Wemmthrough it, and the system termcap file.  However, in order to avoid
18570e3d5408SPeter Wemmslowing down your application startup, it will only do this once per
18580e3d5408SPeter Wemmterminal type!
18590e3d5408SPeter Wemm
18600e3d5408SPeter WemmThe first time you load a given terminal type from your termcap
18610e3d5408SPeter Wemmdatabase, the library initialization code will automatically write it
18620e3d5408SPeter Wemmin terminfo format to a subdirectory under $HOME/.terminfo.  After
18630e3d5408SPeter Wemmthat, the initialization code will find it there and do a (much
18640e3d5408SPeter Wemmfaster) terminfo fetch.
18650e3d5408SPeter Wemm
18660e3d5408SPeter WemmUsually, all this means is that your home directory will silently grow
18670e3d5408SPeter Wemman invisible .terminfo subdirectory which will get filled in with
18680e3d5408SPeter Wemmterminfo descriptions of terminal types as you invoke them.  If anyone
18690e3d5408SPeter Wemmever installs a global terminfo tree on your system, this will quietly
18700e3d5408SPeter Wemmstop happening and your $HOME/.terminfo will become redundant.
18710e3d5408SPeter Wemm
18720e3d5408SPeter WemmThe objective of all this logic is to make converting from BSD termcap
18730e3d5408SPeter Wemmas painless as possible without slowing down your application (termcap
18740e3d5408SPeter Wemmcompilation is expensive).
18750e3d5408SPeter Wemm
18760e3d5408SPeter WemmIf you don't have a TERMCAP variable or custom personal termcap file,
18770e3d5408SPeter Wemmyou can skip the rest of this dissertation.
18780e3d5408SPeter Wemm
18790e3d5408SPeter WemmIf you *do* have a TERMCAP variable and/or a custom personal termcap file
18800e3d5408SPeter Wemmthat defines a terminal type, that definition will stop being visible
18810e3d5408SPeter Wemmto this application after the first time you run it, because it will
18820e3d5408SPeter Wemminstead see the terminfo entry that it wrote to $HOME/terminfo the
18830e3d5408SPeter Wemmfirst time around.
18840e3d5408SPeter Wemm
18850e3d5408SPeter WemmSubsequently, editing the TERMCAP variable or personal TERMCAP file
18860e3d5408SPeter Wemmwill have no effect unless you explicitly remove the terminfo entry
18870e3d5408SPeter Wemmunder $HOME/terminfo.  If you do that, the entry will be recompiled
18880e3d5408SPeter Wemmfrom your termcap resources the next time it is invoked.
18890e3d5408SPeter Wemm
18900e3d5408SPeter WemmTo avoid these complications, use infocmp(1) and tic(1) to edit the
18910e3d5408SPeter Wemmterminfo directory directly.
18920e3d5408SPeter Wemm
18930e3d5408SPeter Wemm------------------------------- CUT HERE --------------------------------
18940e3d5408SPeter Wemm
18950e3d5408SPeter WemmUSING NCURSES WITH AFS:
18960e3d5408SPeter Wemm	AFS treats each directory as a separate logical filesystem, you
18970e3d5408SPeter Wemm	can't hard-link across them.  The --enable-symlinks option copes
18980e3d5408SPeter Wemm	with this by making tic use symbolic links.
18990e3d5408SPeter Wemm
19000e3d5408SPeter WemmUSING NCURSES WITH GPM:
190106bfebdeSXin LI	Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
190206bfebdeSXin LI	which is used with Linux console.  Be aware that GPM is commonly
19030e3d5408SPeter Wemm	installed as a shared library which contains a wrapper for the curses
19040e3d5408SPeter Wemm	wgetch() function (libcurses.o).  Some integrators have simplified
19054a1a9510SRong-En Fan	linking applications by combining all or part of libcurses.so into the
19064a1a9510SRong-En Fan	libgpm.so file, producing symbol conflicts with ncurses (specifically
19074a1a9510SRong-En Fan	the wgetch function).  This was originally the BSD curses, but
19084a1a9510SRong-En Fan	generally whatever curses library exists on the system.
19094a1a9510SRong-En Fan
19104a1a9510SRong-En Fan	You may be able to work around this problem by linking as follows:
19110e3d5408SPeter Wemm
19120e3d5408SPeter Wemm		cc -o foo foo.o -lncurses -lgpm -lncurses
19130e3d5408SPeter Wemm
19140e3d5408SPeter Wemm	but the linker may not cooperate, producing mysterious errors.
19154a1a9510SRong-En Fan	See the FAQ, as well as the discussion under the --with-gpm option:
19160e3d5408SPeter Wemm
19174a1a9510SRong-En Fan	http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
19180e3d5408SPeter Wemm
191918259542SPeter WemmBUILDING NCURSES WITH A CROSS-COMPILER
192018259542SPeter Wemm	Ncurses can be built with a cross-compiler.  Some parts must be built
192118259542SPeter Wemm	with the host's compiler since they are used for building programs
192218259542SPeter Wemm	(e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
19234a1a9510SRong-En Fan	that are compiled into the ncurses library.  The essential thing to do
19244a1a9510SRong-En Fan	is set the BUILD_CC environment variable to your host's compiler, and
19254a1a9510SRong-En Fan	run the configure script configuring for the cross-compiler.
19264a1a9510SRong-En Fan
19274a1a9510SRong-En Fan	The configure options --with-build-cc, etc., are provided to make this
19284a1a9510SRong-En Fan	simpler.  Since make_hash and make_keys use only ANSI C features, it
19294a1a9510SRong-En Fan	is normally not necessary to provide the other options such as
19304a1a9510SRong-En Fan	--with-build-libs, but they are provided for completeness.
19310e3d5408SPeter Wemm
193218259542SPeter Wemm	Note that all of the generated source-files which are part of ncurses
193318259542SPeter Wemm	will be made if you use
19340e3d5408SPeter Wemm
193518259542SPeter Wemm		make sources
193618259542SPeter Wemm
193718259542SPeter Wemm	This would be useful in porting to an environment which has little
193818259542SPeter Wemm	support for the tools used to generate the sources, e.g., sed, awk and
193918259542SPeter Wemm	Bourne-shell.
19400e3d5408SPeter Wemm
19414a1a9510SRong-En Fan	When ncurses has been successfully cross-compiled, you may want to use
19424a1a9510SRong-En Fan	"make install" (with a suitable target directory) to construct an
19434a1a9510SRong-En Fan	install tree.  Note that in this case (as with the --with-fallbacks
19444a1a9510SRong-En Fan	option), ncurses uses the development platform's tic to do the
19454a1a9510SRong-En Fan	"make install.data" portion.
19464a1a9510SRong-En Fan
194706bfebdeSXin LI	The system's tic program is used to install the terminal database,
194806bfebdeSXin LI	even for cross-compiles.  For best results, the tic program should
194906bfebdeSXin LI	be from the most current version of ncurses.
195006bfebdeSXin LI
19510e3d5408SPeter WemmBUGS:
19520e3d5408SPeter Wemm	Send any feedback to the ncurses mailing list at
19530e3d5408SPeter Wemm	bug-ncurses@gnu.org. To subscribe send mail to
19540e3d5408SPeter Wemm	bug-ncurses-request@gnu.org with body that reads:
19550e3d5408SPeter Wemm	subscribe ncurses <your-email-address-here>
19560e3d5408SPeter Wemm
195718259542SPeter Wemm	The Hacker's Guide in the doc directory includes some guidelines
19580e3d5408SPeter Wemm	on how to report bugs in ways that will get them fixed most quickly.
19594a1a9510SRong-En Fan
19604a1a9510SRong-En Fan-- vile:txtmode
1961