1166124Srafan------------------------------------------------------------------------------- 2184989Srafan-- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. -- 3166124Srafan-- -- 4166124Srafan-- Permission is hereby granted, free of charge, to any person obtaining a -- 5166124Srafan-- copy of this software and associated documentation files (the -- 6166124Srafan-- "Software"), to deal in the Software without restriction, including -- 7166124Srafan-- without limitation the rights to use, copy, modify, merge, publish, -- 8166124Srafan-- distribute, distribute with modifications, sublicense, and/or sell copies -- 9166124Srafan-- of the Software, and to permit persons to whom the Software is furnished -- 10166124Srafan-- to do so, subject to the following conditions: -- 11166124Srafan-- -- 12166124Srafan-- The above copyright notice and this permission notice shall be included -- 13166124Srafan-- in all copies or substantial portions of the Software. -- 14166124Srafan-- -- 15166124Srafan-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- 16166124Srafan-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- 17166124Srafan-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -- 18166124Srafan-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- 19166124Srafan-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- 20166124Srafan-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -- 21166124Srafan-- USE OR OTHER DEALINGS IN THE SOFTWARE. -- 22166124Srafan-- -- 23166124Srafan-- Except as contained in this notice, the name(s) of the above copyright -- 24166124Srafan-- holders shall not be used in advertising or otherwise to promote the -- 25166124Srafan-- sale, use or other dealings in this Software without prior written -- 26166124Srafan-- authorization. -- 27166124Srafan------------------------------------------------------------------------------- 28184989Srafan-- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $ 2950276Speter--------------------------------------------------------------------- 3050276Speter How to install Ncurses/Terminfo on your system 3150276Speter--------------------------------------------------------------------- 3262449Speter 3350276Speter ************************************************************ 3450276Speter * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. * 3550276Speter ************************************************************ 3650276Speter 3750276SpeterYou should be reading the file INSTALL in a directory called ncurses-d.d, where 3850276Speterd.d is the current version number. There should be several subdirectories, 3950276Speterincluding `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs', 4050276Speterand `test'. See the README file for a roadmap to the package. 4150276Speter 4250276SpeterIf you are a Linux or FreeBSD or NetBSD distribution integrator or packager, 4350276Speterplease read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR 4450276Speterbelow. 4550276Speter 4650276SpeterIf you are converting from BSD curses and do not have root access, be sure 4750276Speterto read the BSD CONVERSION NOTES section below. 4850276Speter 4950276SpeterIf you are trying to build applications using gpm with ncurses, 5050276Speterread the USING NCURSES WITH GPM section below. 5150276Speter 5250276SpeterIf you are running over the Andrew File System see the note below on 5350276SpeterUSING NCURSES WITH AFS. 5450276Speter 5566963SpeterIf you are cross-compiling, see the note below on BUILDING NCURSES WITH A 5666963SpeterCROSS-COMPILER. 5766963Speter 5850276SpeterIf you want to build the Ada95 binding, go to the Ada95 directory and 5950276Speterfollow the instructions there. The Ada95 binding is not covered below. 6050276Speter 6150276SpeterIf you are using anything but (a) Linux, or (b) one of the 4.4BSD-based 6250276Speteri386 Unixes, go read the Portability section in the TO-DO file before you 6350276Speterdo anything else. 6450276Speter 6562449Speter 6650276SpeterREQUIREMENTS: 6762449Speter------------ 6850276Speter 69166124SrafanYou will need the following to build and install ncurses under UNIX: 7050276Speter 71166124Srafan * ANSI C compiler (gcc, for instance) 7250276Speter * sh (bash will do) 7350276Speter * awk (mawk or gawk will do) 7450276Speter * sed 7550276Speter * BSD or System V style install (a script is enclosed) 7650276Speter 7750276SpeterNcurses has been also built in the OS/2 EMX environment. 7850276Speter 7962449Speter 8050276SpeterINSTALLATION PROCEDURE: 8162449Speter---------------------- 8250276Speter 8350276Speter1. First, decide whether you want ncurses to replace your existing library (in 8450276Speter which case you'll need super-user privileges) or be installed in parallel 8550276Speter with it. 8650276Speter 8750276Speter The --prefix option to configure changes the root directory for installing 88166124Srafan ncurses. The default is normally in subdirectories of /usr/local, except 89166124Srafan for systems where ncurses is normally installed as a system library, e.g., 90166124Srafan Linux, the various BSD systems and Cygwin. Use --prefix=/usr to replace 91166124Srafan your default curses distribution. 9250276Speter 9350276Speter The package gets installed beneath the --prefix directory as follows: 9450276Speter 9550276Speter In $(prefix)/bin: tic, infocmp, captoinfo, tset, 9666963Speter reset, clear, tput, toe 9750276Speter In $(prefix)/lib: libncurses*.* libcurses.a 9850276Speter In $(prefix)/share/terminfo: compiled terminal descriptions 9950276Speter In $(prefix)/include: C header files 10050276Speter Under $(prefix)/man: the manual pages 10150276Speter 102166124Srafan Note that the configure script attempts to locate previous installation of 103166124Srafan ncurses, and will set the default prefix according to where it finds the 104166124Srafan ncurses headers. 10550276Speter 106166124Srafan Do not use commands such as 107166124Srafan 108166124Srafan make install prefix=XXX 109166124Srafan 110166124Srafan to change the prefix after configuration, since the prefix value is used 111166124Srafan for some absolute pathnames such as TERMINFO. Instead do this 112166124Srafan 113166124Srafan make install DESTDIR=XXX 114166124Srafan 115166124Srafan See also the discussion of --with-install-prefix. 116166124Srafan 11750276Speter2. Type `./configure' in the top-level directory of the distribution to 11850276Speter configure ncurses for your operating system and create the Makefiles. 11950276Speter Besides --prefix, various configuration options are available to customize 12050276Speter the installation; use `./configure --help' to list the available options. 12150276Speter 12250276Speter If your operating system is not supported, read the PORTABILITY section in 12350276Speter the file ncurses/README for information on how to create a configuration 12450276Speter file for your system. 12550276Speter 12650276Speter The `configure' script generates makefile rules for one or more object 12750276Speter models and their associated libraries: 12850276Speter 12950276Speter libncurses.a (normal) 13050276Speter 13150276Speter libcurses.a (normal, a link to libncurses.a) 13250276Speter This gets left out if you configure with --disable-overwrite. 13350276Speter 13450276Speter libncurses.so (shared) 13550276Speter 13650276Speter libncurses_g.a (debug) 13750276Speter 13850276Speter libncurses_p.a (profile) 13950276Speter 14076726Speter libncurses.la (libtool) 14176726Speter 142166124Srafan If you configure using the --enable-widec option, a "w" is appended to the 143166124Srafan library names (e.g., libncursesw.a), and the resulting libraries support 144166124Srafan wide-characters, e.g., via a UTF-8 locale. The corresponding header files 145166124Srafan are compatible with the non-wide-character configuration; wide-character 146166124Srafan features are provided by ifdef's in the header files. The wide-character 147166124Srafan library interfaces are not binary-compatible with the non-wide-character 148166124Srafan version. Building and running the wide-character code relies on a fairly 149166124Srafan recent implementation of libiconv. We have built this configuration on 150166124Srafan Linux using libiconv, sometimes requiring libutf8. 151166124Srafan 152178866Srafan If you configure using the --with-pthread option, a "t" is appended to 153178866Srafan the library names (e.g., libncursest.a, libncursestw.a). 154178866Srafan 15550276Speter If you do not specify any models, the normal and debug libraries will be 15650276Speter configured. Typing `configure' with no arguments is equivalent to: 15750276Speter 15866963Speter ./configure --with-normal --with-debug --enable-overwrite 15950276Speter 16050276Speter Typing 16150276Speter 16266963Speter ./configure --with-shared 16350276Speter 16450276Speter makes the shared libraries the default, resulting in 16550276Speter 16666963Speter ./configure --with-shared --with-normal --with-debug --enable-overwrite 16750276Speter 16850276Speter If you want only shared libraries, type 16950276Speter 17066963Speter ./configure --with-shared --without-normal --without-debug 17150276Speter 17250276Speter Rules for generating shared libraries are highly dependent upon the choice 17350276Speter of host system and compiler. We've been testing shared libraries on Linux 17450276Speter and SunOS with gcc, but more work needs to be done to make shared libraries 17550276Speter work on other systems. 17650276Speter 17776726Speter If you have libtool installed, you can type 17876726Speter 17976726Speter ./configure --with-libtool 18076726Speter 18176726Speter to generate the appropriate static and/or shared libraries for your 18276726Speter platform using libtool. 18376726Speter 18450276Speter You can make curses and terminfo fall back to an existing file of termcap 18550276Speter definitions by configuring with --enable-termcap. If you do this, the 18650276Speter library will search /etc/termcap before the terminfo database, and will 18750276Speter also interpret the contents of the TERM environment variable. See the 18850276Speter section BSD CONVERSION NOTES below. 18950276Speter 19050276Speter3. Type `make'. Ignore any warnings, no error messages should be produced. 19150276Speter This should compile the ncurses library, the terminfo compiler tic(1), 19250276Speter captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1) 19366963Speter programs (see the manual pages for explanation of what they do), some test 19450276Speter programs, and the panels, menus, and forms libraries. 19550276Speter 19650276Speter4. Run ncurses and several other test programs in the test directory to 19750276Speter verify that ncurses functions correctly before doing an install that 19850276Speter may overwrite system files. Read the file test/README for details on 19950276Speter the test programs. 20062449Speter 20150276Speter NOTE: You must have installed the terminfo database, or set the 20250276Speter environment variable $TERMINFO to point to a SVr4-compatible terminfo 20350276Speter database before running the test programs. Not all vendors' terminfo 20450276Speter databases are SVr4-compatible, but most seem to be. Exceptions include 20550276Speter DEC's Digital Unix (formerly known as OSF/1). 20650276Speter 207166124Srafan If you run the test programs WITHOUT installing terminfo, ncurses may 208166124Srafan read the termcap file and cache that in $HOME/.terminfo, which will 209166124Srafan thereafter be used instead of the terminfo database. See the comments 210166124Srafan on "--enable-getcap-cache", to see why this is a Bad Thing. 211166124Srafan 212166124Srafan It is possible to configure ncurses to use other terminfo database formats. 213166124Srafan A few are provided as examples in the include-directory (see --with-caps). 214166124Srafan 21550276Speter The ncurses program is designed specifically to test the ncurses library. 21650276Speter You can use it to verify that the screen highlights work correctly, that 21750276Speter cursor addressing and window scrolling works OK, etc. 21850276Speter 21950276Speter5. Once you've tested, you can type `make install' to install libraries, 22066963Speter the programs, the terminfo database and the manual pages. Alternately, you 22150276Speter can type `make install' in each directory you want to install. In the 22250276Speter top-level directory, you can do a partial install using these commands: 22350276Speter 22450276Speter 'make install.progs' installs tic, infocmp, etc... 22566963Speter 'make install.includes' installs the headers. 22666963Speter 'make install.libs' installs the libraries (and the headers). 22766963Speter 'make install.data' installs the terminfo data. (Note: `tic' must 22866963Speter be installed before the terminfo data can be 22966963Speter compiled). 23066963Speter 'make install.man' installs the manual pages. 23150276Speter 23250276Speter ############################################################################ 23350276Speter # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing # 23450276Speter # terminfo database. If you have any custom or unusual entries SAVE them # 23550276Speter # before you install ncurses. I have a file called terminfo.custom for # 23650276Speter # this purpose. Don't forget to run tic on the file once you're done. # 23750276Speter ############################################################################ 23850276Speter 23966963Speter The terminfo(5) manual page must be preprocessed with tbl(1) before 24050276Speter being formatted by nroff(1). Modern man(1) implementations tend to do 24166963Speter this by default, but you may want to look at your version's manual page 24276726Speter to be sure. You may also install the manual pages after preprocessing 24376726Speter with tbl(1) by specifying the configure option --with-manpage-tbl. 24450276Speter 24550276Speter If the system already has a curses library that you need to keep using 246166124Srafan you'll need to distinguish between it and ncurses. See the discussion of 247166124Srafan --disable-overwrite. If ncurses is installed outside the standard 248166124Srafan directories (/usr/include and /usr/lib) then all your users will need to 249166124Srafan use the -I option to compile programs and -L to link them. 25050276Speter 251166124Srafan If you have another curses installed in your system and you accidentally 25250276Speter compile using its curses.h you'll end up with a large number of 253166124Srafan undefined symbols at link time. 25450276Speter 25550276Speter IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory 25650276Speter and run the `capconvert' script. This script will deduce various things 25750276Speter about your environment and use them to build you a private terminfo tree, 25850276Speter so you can use ncurses applications. 25950276Speter 26050276Speter If more than one user at your site does this, the space for the duplicate 26150276Speter trees is wasted. Try to get your site administrators to install a system- 26250276Speter wide terminfo tree instead. 26350276Speter 26450276Speter See the BSD CONVERSION NOTES section below for a few more details. 26550276Speter 26650276Speter6. The c++ directory has C++ classes that are built on top of ncurses and 26756639Speter panels. You must have c++ (and its libraries) installed before you can 26850276Speter compile and run the demo. 26950276Speter 27056639Speter Use --without-cxx-binding to tell configure to not build the C++ bindings 27156639Speter and demo. 27256639Speter 27350276Speter If you do not have C++, you must use the --without-cxx option to tell 27456639Speter the configure script to not attempt to determine the type of 'bool' 27556639Speter which may be supported by C++. IF YOU USE THIS OPTION, BE ADVISED THAT 27656639Speter YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++. 27762449Speter 27850276Speter 27966963SpeterSUMMARY OF CONFIGURE OPTIONS: 28066963Speter---------------------------- 28166963Speter 28266963Speter The configure script provides a short list of its options when you type 28366963Speter 28466963Speter ./configure --help 28566963Speter 28666963Speter The --help and several options are common to all configure scripts that are 28766963Speter generated with autoconf. Those are all listed before the line 28866963Speter 28966963Speter --enable and --with options recognized: 29066963Speter 29166963Speter The other options are specific to this package. We list them in alphabetic 29266963Speter order. 29366963Speter 29466963Speter --disable-assumed-color 29566963Speter With ncurses 5.1, we introduced a new function, assume_default_colors() 29666963Speter which allows applications to specify what the default foreground and 29766963Speter background color are assumed to be. Most color applications use 29866963Speter full-screen color; but a few do not color the background. While the 29966963Speter assumed values can be overridden by invoking assume_default_colors(), 30066963Speter you may find it useful to set the assumed values to the pre-5.1 30166963Speter convention, using this configure option. 30266963Speter 30366963Speter --disable-big-core 30466963Speter Assume machine has little memory. The configure script attempts to 30566963Speter determine if your machine has enough memory (about 6Mb) to compile the 30666963Speter terminfo database without writing portions to disk. Some allocators 30766963Speter return deceptive results, so you may have to override the configure 30866963Speter script. Or you may be building tic for a smaller machine. 30966963Speter 310174993Srafan --disable-big-strings 311174993Srafan Disable compile-time optimization of predefined tables which puts 312174993Srafan all of their strings into a very long string, to reduce relocation 313174993Srafan overhead. 314174993Srafan 31566963Speter --disable-database 31666963Speter Use only built-in data. The ncurses libraries normally read terminfo 31766963Speter and termcap data from disk. You can configure ncurses to have a 31866963Speter built-in database, aka "fallback" entries. Embedded applications may 31997049Speter have no need for an external database. Some, but not all of the 32097049Speter programs are useful in this configuration, e.g., reset and tput versus 32197049Speter infocmp and tic. 32266963Speter 32366963Speter --disable-ext-funcs 32466963Speter Disable function-extensions. Configure ncurses without the functions 32566963Speter that are not specified by XSI. See ncurses/modules for the exact 32666963Speter list of library modules that would be suppressed. 32766963Speter 32866963Speter --disable-hashmap 32966963Speter Compile without hashmap scrolling-optimization code. This algorithm is 33066963Speter the default. 33166963Speter 332166124Srafan --disable-home-terminfo 333166124Srafan The $HOME/.terminfo directory is normally added to ncurses' search 334166124Srafan list for reading/writing terminfo entries, since that directory is 335166124Srafan more likely writable than the system terminfo database. Use this 336166124Srafan option to disable the feature altogether. 337166124Srafan 338166124Srafan --disable-largefile 339166124Srafan Disable compiler flags needed to use large-file interfaces. 340166124Srafan 34166963Speter --disable-leaks 34266963Speter For testing, compile-in code that frees memory that normally would not 34366963Speter be freed, to simplify analysis of memory-leaks. 34466963Speter 345174993Srafan Any implementation of curses must not free the memory associated with 346174993Srafan a screen, since (even after calling endwin()), it must be available 347174993Srafan for use in the next call to refresh(). There are also chunks of 348174993Srafan memory held for performance reasons. That makes it hard to analyze 349174993Srafan curses applications for memory leaks. To work around this, build 350174993Srafan a debugging version of the ncurses library which frees those chunks 351174993Srafan which it can, and provides the _nc_free_and_exit() function to free 352174993Srafan the remainder on exit. The ncurses utility and test programs use this 353174993Srafan feature, e.g., via the ExitProgram() macro. 354174993Srafan 355166124Srafan --disable-lp64 356166124Srafan The header files will ignore use of the _LP64 symbol to make chtype 357166124Srafan and mmask_t types 32 bits (they may be long on 64-bit hosts, for 358166124Srafan compatibility with older releases). 359166124Srafan 360166124Srafan NOTE: this is potentially an ABI change, depending on existing 361166124Srafan packages. The default for this option is "disabled" for ncurses 362166124Srafan ABI 5, and "enabled" for ABI 6. 363166124Srafan 36466963Speter --disable-macros 36566963Speter For testing, use functions rather than macros. The program will run 366166124Srafan more slowly, but it is simpler to debug. This defines NCURSES_NOMACROS 367166124Srafan at build time. See also the --enable-expanded option. 36866963Speter 36966963Speter --disable-overwrite 37066963Speter If you are installing ncurses on a system which contains another 37166963Speter development version of curses, or which could be confused by the loader 37266963Speter for another version, we recommend that you leave out the link to 37366963Speter -lcurses. The ncurses library is always available as -lncurses. 37466963Speter Disabling overwrite also causes the ncurses header files to be 37566963Speter installed into a subdirectory, e.g., /usr/local/include/ncurses, 37666963Speter rather than the include directory. This makes it simpler to avoid 37766963Speter compile-time conflicts with other versions of curses.h 37866963Speter 379174993Srafan --disable-relink 380174993Srafan If --enable-rpath is given, the generated makefiles normally will 381174993Srafan rebuild the libraries during install. Use this option to simply 382174993Srafan copy whatever the linked produced. 383174993Srafan 384174993Srafan This option is ignored if --enable-rpath is not given. 385174993Srafan 38666963Speter --disable-root-environ 38766963Speter Compile with environment restriction, so certain environment variables 38866963Speter are not available when running as root, or via a setuid/setgid 38966963Speter application. These are (for example $TERMINFO) those that allow the 39066963Speter search path for the terminfo or termcap entry to be customized. 39166963Speter 39266963Speter --disable-scroll-hints 39366963Speter Compile without scroll-hints code. This option is ignored when 39466963Speter hashmap scrolling is configured, which is the default. 39566963Speter 396184989Srafan --disable-tic-depends 397184989Srafan When building shared libraries, normally the tic library is linked to 398184989Srafan depend upon the ncurses library (and in turn, on the term-library if 399184989Srafan the --with-termlib option was given). The tic- and term-libraries 400184989Srafan ABI does not depend on the --enable-widec option. Some packagers have 401184989Srafan used this to reduce the number of library files which are packaged 402184989Srafan by using only one copy of those libraries. To make this work properly, 403184989Srafan the tic library must be built without an explicit dependency on the 404184989Srafan ncurses (or ncursesw) library. Use this configure option to do that. 405184989Srafan For example 406184989Srafan configure --with-ticlib --with-shared --disable-tic-depends 407184989Srafan 408166124Srafan --disable-tparm-varargs 409166124Srafan Portable programs should call tparm() using the fixed-length parameter 410166124Srafan list documented in X/Open. ncurses provides varargs support for this 411166124Srafan function. Use --disable-tparm-varargs to disable this support. 41266963Speter 41366963Speter --enable-assertions 41466963Speter For testing, compile-in assertion code. This is used only for a few 41566963Speter places where ncurses cannot easily recover by returning an error code. 41666963Speter 41766963Speter --enable-broken_linker 41866963Speter A few platforms have what we consider a broken linker: it cannot link 41966963Speter objects from an archive solely by referring to data objects in those 42066963Speter files, but requires a function reference. This configure option 42166963Speter changes several data references to functions to work around this 42266963Speter problem. 42366963Speter 42466963Speter NOTE: With ncurses 5.1, this may not be necessary, since we are 42566963Speter told that some linkers interpret uninitialized global data as a 42666963Speter different type of reference which behaves as described above. We have 42766963Speter explicitly initialized all of the global data to work around the 42866963Speter problem. 42966963Speter 43066963Speter --enable-bsdpad 43166963Speter Recognize BSD-style prefix padding. Some ancient BSD programs (such as 43266963Speter nethack) call tputs("50") to implement delays. 43366963Speter 43466963Speter --enable-colorfgbg 43566963Speter Compile with experimental $COLORFGBG code. That environment variable 43666963Speter is set by some terminal emulators as a hint to applications, by 43766963Speter advertising the default foreground and background colors. During 43866963Speter initialization, ncurses sets color pair 0 to match this. 43966963Speter 44066963Speter --enable-const 44166963Speter The curses interface as documented in XSI is rather old, in fact 44266963Speter including features that precede ANSI C. The prototypes generally do 44366963Speter not make effective use of "const". When using stricter compilers (or 44466963Speter gcc with appropriate warnings), you may see warnings about the mismatch 44566963Speter between const and non-const data. We provide a configure option which 44666963Speter changes the interfaces to use const - quieting these warnings and 44766963Speter reflecting the actual use of the parameters more closely. The ncurses 44866963Speter library uses the symbol NCURSES_CONST for these instances of const, 44966963Speter and if you have asked for compiler warnings, will add gcc's const-qual 45066963Speter warning. There will still be warnings due to subtle inconsistencies 45166963Speter in the interface, but at a lower level. 45266963Speter 45366963Speter NOTE: configuring ncurses with this option may detract from the 45466963Speter portability of your applications by encouraging you to use const in 45566963Speter places where the XSI curses interface would not allow them. Similar 45666963Speter issues arise when porting to SVr4 curses, which uses const in even 45766963Speter fewer places. 45866963Speter 45966963Speter --enable-echo 46066963Speter Use the option --disable-echo to make the build-log less verbose by 46166963Speter suppressing the display of the compile and link commands. This makes 46266963Speter it easier to see the compiler warnings. (You can always use "make -n" 46366963Speter to see the options that are used). 46466963Speter 46566963Speter --enable-expanded 46666963Speter For testing, generate functions for certain macros to make them visible 46766963Speter as such to the debugger. See also the --disable-macros option. 46866963Speter 469166124Srafan --enable-ext-colors 470166124Srafan Extend the cchar_t structure to allow more than 16 colors to be 471166124Srafan encoded. This applies only to the wide-character (--enable-widec) 472166124Srafan configuration. 473166124Srafan 474166124Srafan NOTE: using this option will make libraries which are not binary- 475166124Srafan compatible with libncursesw 5.4. None of the interfaces change, but 476166124Srafan applications which have an array of cchar_t's must be recompiled. 477166124Srafan 478166124Srafan --enable-ext-mouse 479166124Srafan Modify the encoding of mouse state to make room for a 5th mouse button. 480166124Srafan That allows one to use ncurses with a wheel mouse with xterm or 481166124Srafan similar X terminal emulators. 482166124Srafan 483166124Srafan NOTE: using this option will make libraries which are not binary- 484166124Srafan compatible with libncursesw 5.4. None of the interfaces change, but 485166124Srafan applications which have mouse mask mmask_t's must be recompiled. 486166124Srafan 48766963Speter --enable-getcap 48866963Speter Use the 4.4BSD getcap code if available, or a bundled version of it to 48966963Speter fetch termcap entries. Entries read in this way cannot use (make 49066963Speter cross-references to) the terminfo tree, but it is faster than reading 49166963Speter /etc/termcap. 49266963Speter 493166124Srafan If configured for one of the *BSD systems, this automatically uses 494166124Srafan the hashed database system produced using cap_mkdb or similar tools. 495166124Srafan In that case, there is no advantage in using the --enable-getcap-cache 496166124Srafan option. 497166124Srafan 498166124Srafan See also the --with-hashed-db option. 499166124Srafan 50066963Speter --enable-getcap-cache 50166963Speter Cache translated termcaps under the directory $HOME/.terminfo 50266963Speter 503166124Srafan NOTE: this sounds good - it makes ncurses run faster the second time. 50466963Speter But look where the data comes from - an /etc/termcap containing lots of 50566963Speter entries that are not up to date. If you configure with this option and 50666963Speter forget to install the terminfo database before running an ncurses 50766963Speter application, you will end up with a hidden terminfo database that 50866963Speter generally does not support color and will miss some function keys. 50966963Speter 51066963Speter --enable-hard-tabs 51166963Speter Compile-in cursor-optimization code that uses hard-tabs. We would make 51266963Speter this a standard feature except for the concern that the terminfo entry 51366963Speter may not be accurate, or that your stty settings have disabled the use 51466963Speter of tabs. 51566963Speter 516174993Srafan --enable-mixed-case 517174993Srafan Controls whether the filesystem on which the terminfo database resides 518174993Srafan supports mixed-case filenames (normal for UNIX, but not on other 519174993Srafan systems). If you do not specify this option, the configure script 520174993Srafan checks the current filesystem. 521174993Srafan 52266963Speter --enable-no-padding 52366963Speter Compile-in support for the $NCURSES_NO_PADDING environment variable, 52466963Speter which allows you to suppress the effect of non-mandatory padding in 52566963Speter terminfo entries. This is the default, unless you have disabled the 52666963Speter extended functions. 52766963Speter 528174993Srafan --enable-reentrant 529174993Srafan Compile experimental configuration which improves reentrant use of the 530178866Srafan library by reducing global and static variables. This option is also 531178866Srafan set if --with-pthread is used. 532174993Srafan 53366963Speter --enable-rpath 534166124Srafan Use rpath option when generating shared libraries, and (with some 535166124Srafan restrictions) when linking the corresponding programs. This originally 536166124Srafan (in 1997) applied mainly to systems using the GNU linker (read the 537166124Srafan manpage). 53866963Speter 539166124Srafan More recently it is useful for systems that require special treatment 540166124Srafan shared libraries in "unusual" locations. The "system" libraries reside 541166124Srafan in directories which are on the loader's default search-path. While 542166124Srafan you may be able to use workarounds such as the $LD_LIBRARY_PATH 543166124Srafan environment variable, they do not work with setuid applications since 544166124Srafan the LD_LIBRARY_PATH variable would be unset in that situation. 545166124Srafan 546174993Srafan This option does not apply to --with-libtool, since libtool makes 547174993Srafan extra assumptions about rpath. 548174993Srafan 54966963Speter --enable-safe-sprintf 55066963Speter Compile with experimental safe-sprintf code. You may consider using 55166963Speter this if you are building ncurses for a system that has neither 55266963Speter vsnprintf() or vsprintf(). It is slow, however. 55366963Speter 55466963Speter --enable-sigwinch 55566963Speter Compile support for ncurses' SIGWINCH handler. If your application has 55666963Speter its own SIGWINCH handler, ncurses will not use its own. The ncurses 55766963Speter handler causes wgetch() to return KEY_RESIZE when the screen-size 55866963Speter changes. This option is the default, unless you have disabled the 55966963Speter extended functions. 56066963Speter 561166124Srafan --enable-signed-char 562166124Srafan The term.h header declares a Booleans[] array typed "char". But it 563166124Srafan stores signed values there and "char" is not necessarily signed. 564166124Srafan Some packagers choose to alter the type of Booleans[] though this 565166124Srafan is not strictly compatible. This option allows one to implement this 566166124Srafan alteration without patching the source code. 567166124Srafan 56866963Speter --enable-symlinks 56966963Speter If your system supports symbolic links, make tic use symbolic links 57066963Speter rather than hard links to save diskspace when writing aliases in the 57166963Speter terminfo database. 57266963Speter 57366963Speter --enable-tcap-names 57466963Speter Compile-in support for user-definable terminal capabilities. Use the 57566963Speter -x option of tic and infocmp to treat unrecognized terminal 57666963Speter capabilities as user-defined strings. This option is the default, 57766963Speter unless you have disabled the extended functions. 57866963Speter 57966963Speter --enable-termcap 58066963Speter Compile in support for reading terminal descriptions from termcap if no 58166963Speter match is found in the terminfo database. See also the --enable-getcap 58266963Speter and --enable-getcap-cache options. 58366963Speter 58466963Speter --enable-warnings 58566963Speter Turn on GCC compiler warnings. There should be only a few. 58666963Speter 587184989Srafan --enable-weak-symbols 588184989Srafan If the --with-pthread option is set, check if the compiler supports 589184989Srafan weak-symbols. If it does, then name the thread-capable library without 590184989Srafan the "t" (libncurses rather than libncursest), and provide for 591184989Srafan dynamically loading the pthreads entrypoints at runtime. This allows 592184989Srafan one to reduce the number of library files for ncurses. 593184989Srafan 594166124Srafan --enable-wgetch-events 595166124Srafan Compile with experimental wgetch-events code. See ncurses/README.IZ 596166124Srafan 59766963Speter --enable-widec 598166124Srafan Compile with wide-character code. This makes a different version of 599166124Srafan the libraries (e.g., libncursesw.so), which stores characters as 600166124Srafan wide-characters, 60166963Speter 60266963Speter NOTE: applications compiled with this configuration are not compatible 60366963Speter with those built for 8-bit characters. You cannot simply make a 60466963Speter symbolic link to equate libncurses.so with libncursesw.so 60566963Speter 606166124Srafan NOTE: the Ada95 binding may be built against either version of the the 607166124Srafan ncurses library, but you must decide which: the binding installs the 608166124Srafan same set of files for either version. Currently (2002/6/22) it does 609166124Srafan not use the extended features from the wide-character code, so it is 610166124Srafan probably better to not install the binding for that configuration. 611166124Srafan 61266963Speter --enable-xmc-glitch 61366963Speter Compile-in support experimental xmc (magic cookie) code. 61466963Speter 615166124Srafan --with-abi-version=NUM 616166124Srafan Override the ABI version, which is used in shared library filenames. 617166124Srafan Normally this is the same as the release version; some ports have 618166124Srafan special requirements for compatibility. 619166124Srafan 620184989Srafan This option does not affect linking with libtool, which uses the 621184989Srafan release major/minor numbers. 622184989Srafan 62366963Speter --with-ada-compiler=CMD 62466963Speter Specify the Ada95 compiler command (default "gnatmake") 62566963Speter 62666963Speter --with-ada-include=DIR 627166124Srafan Tell where to install the Ada includes (default: 62866963Speter PREFIX/lib/ada/adainclude) 62966963Speter 63066963Speter --with-ada-objects=DIR 63166963Speter Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib) 63266963Speter 63397049Speter --with-bool=TYPE 63497049Speter If --without-cxx is specified, override the type used for the "bool" 63597049Speter declared in curses.h (normally the type is automatically chosen to 63697049Speter correspond with that in <stdbool.h>, or defaults to platform-specific 63797049Speter sizes). 63897049Speter 63997049Speter --with-build-cc=XXX 64097049Speter If cross-compiling, specify a host C compiler, which is needed to 641166124Srafan compile a few utilities which generate source modules for ncurses. 64297049Speter If you do not give this option, the configure script checks if the 64397049Speter $BUILD_CC variable is set, and otherwise defaults to gcc or cc. 64497049Speter 64597049Speter --with-build-cflags=XXX 64697049Speter If cross-compiling, specify the host C compiler-flags. You might need 64797049Speter to do this if the target compiler has unusual flags which confuse the 64897049Speter host compiler. 64997049Speter 650184989Srafan You can also set the environment variable $BUILD_CFLAGS rather than 651184989Srafan use this option. 652184989Srafan 653166124Srafan --with-build-cppflags=XXX 654166124Srafan If cross-compiling, specify the host C preprocessor-flags. You might 655166124Srafan need to do this if the target compiler has unusual flags which confuse 656166124Srafan the host compiler. 657166124Srafan 658184989Srafan You can also set the environment variable $BUILD_CPPFLAGS rather than 659184989Srafan use this option. 660184989Srafan 66197049Speter --with-build-ldflags=XXX 66297049Speter If cross-compiling, specify the host linker-flags. You might need to 66397049Speter do this if the target linker has unusual flags which confuse the host 66497049Speter compiler. 66597049Speter 666184989Srafan You can also set the environment variable $BUILD_LDFLAGS rather than 667184989Srafan use this option. 668184989Srafan 66997049Speter --with-build-libs=XXX 67097049Speter If cross-compiling, the host libraries. You might need to do this if 67197049Speter the target environment requires unusual libraries. 67297049Speter 673184989Srafan You can also set the environment variable $BUILD_LIBS rather than 674184989Srafan use this option. 675184989Srafan 67697049Speter --with-caps=XXX 67797049Speter Specify an alternate terminfo capabilities file, which makes the 67897049Speter configure script look for "include/Caps.XXX". A few systems, e.g., 67997049Speter AIX 4.x use the same overall file-format as ncurses for terminfo 68097049Speter data, but use different alignments within the tables to support 68197049Speter legacy applications. For those systems, you can configure ncurses 68297049Speter to use a terminfo database which is compatible with the native 68397049Speter applications. 68497049Speter 685166124Srafan --with-chtype=TYPE 686166124Srafan Override type of chtype, which stores the video attributes and (if 687166124Srafan --enable-widec is not given) a character. Prior to ncurses 5.5, this 688166124Srafan was always unsigned long, but with ncurses 5.5, it may be unsigned. 689166124Srafan Use this option if you need to preserve compatibility with 64-bit 690166124Srafan executables. 691166124Srafan 69266963Speter --with-database=XXX 69366963Speter Specify the terminfo source file to install. Usually you will wish 69466963Speter to install ncurses' default (misc/terminfo.src). Certain systems 69566963Speter have special requirements, e.g, OS/2 EMX has a customized terminfo 69666963Speter source file. 69766963Speter 69866963Speter --with-dbmalloc 69966963Speter For testing, compile and link with Conor Cahill's dbmalloc library. 700166124Srafan This also sets the --disable-leaks option. 70166963Speter 70266963Speter --with-debug 70366963Speter Generate debug-libraries (default). These are named by adding "_g" 70466963Speter to the root, e.g., libncurses_g.a 70566963Speter 70666963Speter --with-default-terminfo-dir=XXX 70766963Speter Specify the default terminfo database directory. This is normally 70866963Speter DATADIR/terminfo, e.g., /usr/share/terminfo. 70966963Speter 71066963Speter --with-dmalloc 71166963Speter For testing, compile and link with Gray Watson's dmalloc library. 712166124Srafan This also sets the --disable-leaks option. 71366963Speter 71466963Speter --with-fallbacks=XXX 71566963Speter Specify a list of fallback terminal descriptions which will be 71666963Speter compiled into the ncurses library. See CONFIGURING FALLBACK ENTRIES. 71766963Speter 71866963Speter --with-gpm 71966963Speter use Alessandro Rubini's GPM library to provide mouse support on the 720166124Srafan Linux console. Prior to ncurses 5.5, this introduced a dependency on 721166124Srafan the GPM library. 722166124Srafan 723166124Srafan Currently ncurses uses the dlsym() function to bind to the library at 724166124Srafan runtime, so it is only necessary that the library be present when 725166124Srafan ncurses is built, to obtain the filename (or soname) used in the 726166124Srafan corresponding dlopen() call. If you give a value for this option, 727166124Srafan e.g., 72866963Speter 729166124Srafan --with-gpm=$HOME/tmp/test-gpm.so 730166124Srafan 731166124Srafan that overrides the configure check for the soname. 732166124Srafan 733166124Srafan See also --without-dlsym 734166124Srafan 735174993Srafan --with-hashed-db[=XXX] 736166124Srafan Use a hashed database for storing terminfo data rather than storing 737166124Srafan each compiled entry in a separate binary file within a directory 738166124Srafan tree. 739174993Srafan 740174993Srafan In particular, this uses the Berkeley database 1.8.5 interface, as 741174993Srafan provided by that and its successors db 2, 3, and 4. The actual 742174993Srafan interface is slightly different in the successor versions of the 743174993Srafan Berkeley database. The database should have been configured using 744174993Srafan "--enable-compat185". 745166124Srafan 746166124Srafan If you use this option for configuring ncurses, tic will only be able 747166124Srafan to write entries in the hashed database. infocmp can still read 748166124Srafan entries from a directory tree as well as reading entries from the 749166124Srafan hashed database. To do this, infocmp determines whether the $TERMINFO 750166124Srafan variable points to a directory or a file, and reads the directory-tree 751166124Srafan or hashed database respectively. 752166124Srafan 753166124Srafan You cannot have a directory containing both hashed-database and 754166124Srafan filesystem-based terminfo entries. 755166124Srafan 756174993Srafan Use the parameter value to give the install-prefix used for the 757174993Srafan datbase, e.g., 758174993Srafan --with-hashed-db=/usr/local/BigBase 759174993Srafan to find the corresponding include- and lib-directories under the 760174993Srafan given directory. 761174993Srafan 762166124Srafan See also the --enable-getcap option. 763166124Srafan 76466963Speter --with-install-prefix=XXX 76566963Speter Allows you to specify an alternate location for installing ncurses 76666963Speter after building it. The value you specify is prepended to the "real" 767166124Srafan install location. This simplifies making binary packages. The 768166124Srafan makefile variable DESTDIR is set by this option. It is also possible 769166124Srafan to use 770166124Srafan make install DESTDIR=XXX 771166124Srafan since the makefiles pass that variable to subordinate makes. 77266963Speter 77366963Speter NOTE: a few systems build shared libraries with fixed pathnames; this 77466963Speter option probably will not work for those configurations. 77566963Speter 776166124Srafan --with-libtool[=XXX] 777166124Srafan Generate libraries with libtool. If this option is selected, then it 778166124Srafan overrides all other library model specifications. Note that libtool 779166124Srafan must already be installed, uses makefile rules dependent on GNU make, 780166124Srafan and does not promise to follow the version numbering convention of 781166124Srafan other shared libraries on your system. However, if the --with-shared 782166124Srafan option does not succeed, you may get better results with this option. 78376726Speter 784166124Srafan If a parameter value is given, it must be the full pathname of the 785166124Srafan particular version of libtool, e.g., 786166124Srafan /usr/bin/libtool-1.2.3 787166124Srafan 788166124Srafan It is possible to rebuild the configure script to use the automake 789166124Srafan macros for libtool, e.g., AC_PROG_LIBTOOL. See the comments in 790166124Srafan aclocal.m4 for CF_PROG_LIBTOOL, and ensure that you build configure 791166124Srafan using the appropriate patch for autoconf from 792166124Srafan http://invisible-island.net/autoconf/ 793166124Srafan 794166124Srafan --with-manpage-aliases 795166124Srafan Tell the configure script you wish to create entries in the 796166124Srafan man-directory for aliases to manpages which list them, e.g., the 797166124Srafan functions in the panel manpage. This is the default. You can disable 798166124Srafan it if your man program does this. You can also disable 799166124Srafan --with-manpage-symlinks to install files containing a ".so" command 800166124Srafan rather than symbolic links. 801166124Srafan 80266963Speter --with-manpage-format=XXX 80366963Speter Tell the configure script how you would like to install man-pages. The 80466963Speter option value must be one of these: gzip, compress, BSDI, normal, 80566963Speter formatted. If you do not give this option, the configure script 80666963Speter attempts to determine which is the case. 80766963Speter 80866963Speter --with-manpage-renames=XXX 80966963Speter Tell the configure script that you wish to rename the manpages while 81066963Speter installing. Currently the only distribution which does this is 81166963Speter the Linux Debian. The option value specifies the name of a file 81266963Speter that lists the renamed files, e.g., $srcdir/man/man_db.renames 81366963Speter 81466963Speter --with-manpage-symlinks 81566963Speter Tell the configure script that you wish to make symbolic links in the 81666963Speter man-directory for aliases to the man-pages. This is the default, but 81766963Speter can be disabled for systems that provide this automatically. Doing 81866963Speter this on systems that do not support symbolic links will result in 81966963Speter copying the man-page for each alias. 82066963Speter 82176726Speter --with-manpage-tbl 82276726Speter Tell the configure script that you with to preprocess the manpages 82376726Speter by running them through tbl to generate tables understandable by 82476726Speter nroff. 82576726Speter 826166124Srafan --with-mmask-t=TYPE 827166124Srafan Override type of mmask_t, which stores the mouse mask. Prior to 828166124Srafan ncurses 5.5, this was always unsigned long, but with ncurses 5.5, it 829166124Srafan may be unsigned. Use this option if you need to preserve compatibility 830166124Srafan with 64-bit executables. 831166124Srafan 832184989Srafan --with-normal 833184989Srafan Generate normal (i.e., static) libraries (default). 834184989Srafan 835184989Srafan Note: on Linux, the configure script will attempt to use the GPM 836184989Srafan library via the dlsym() function call. Use --without-dlsym to disable 837184989Srafan this feature, or --without-gpm, depending on whether you wish to use 838184989Srafan GPM. 839184989Srafan 84076726Speter --with-ospeed=TYPE 84176726Speter Override type of ospeed variable, which is part of the termcap 84276726Speter compatibility interface. In termcap, this is a 'short', which works 84376726Speter for a wide range of baudrates because ospeed is not the actual speed 844166124Srafan but the encoded value, e.g., B9600 would be a small number such as 13. 84576726Speter However the encoding scheme originally allowed for values "only" up to 84676726Speter 38400bd. A newer set of definitions past 38400bd is not encoded as 84776726Speter compactly, and is not guaranteed to fit into a short (see the function 84876726Speter cfgetospeed(), which returns a speed_t for this reason). In practice, 84976726Speter applications that required knowledge of the ospeed variable, i.e., 85076726Speter those using termcap, do not use the higher speeds. Your application 85176726Speter (or system, in general) may or may not. 85276726Speter 85366963Speter --with-profile 85466963Speter Generate profile-libraries These are named by adding "_p" to the root, 85566963Speter e.g., libncurses_p.a 85666963Speter 857178866Srafan --with-pthread 858178866Srafan Link with POSIX threads, set --enable-reentrant. The use_window() and 859178866Srafan use_screen() functions will use mutex's, allowing rudimentary support 860178866Srafan for multithreaded applications. 861178866Srafan 86266963Speter --with-rcs-ids 86366963Speter Compile-in RCS identifiers. Most of the C files have an identifier. 86466963Speter 865166124Srafan --with-rel-version=NUM 866166124Srafan Override the release version, which may be used in shared library 867166124Srafan filenames. This consists of a major and minor version number separated 868166124Srafan by ".". Normally the major version number is the same as the ABI 869166124Srafan version; some ports have special requirements for compatibility. 870166124Srafan 87166963Speter --with-shared 87266963Speter Generate shared-libraries. The names given depend on the system for 87366963Speter which you are building, typically using a ".so" suffix, along with 87466963Speter symbolic links that refer to the release version. 875166124Srafan 87666963Speter NOTE: Unless you override the configure script by setting the $CFLAGS 87766963Speter environment variable, these will not be built with the -g debugging 87866963Speter option. 87966963Speter 880166124Srafan NOTE: For some configurations, e.g., installing a new version of 881166124Srafan ncurses shared libraries on a machine which already has ncurses 882166124Srafan shared libraries, you may encounter problems with the linker. 883166124Srafan For example, it may prevent you from running the build tree's 884166124Srafan copy of tic (for installing the terminfo database) because it 885166124Srafan loads the system's copy of the ncurses shared libraries. In that 886166124Srafan case, using the misc/shlib script may be helpful, since it sets 887166124Srafan $LD_LIBRARY_PATH to point to the build tree, e.g., 888166124Srafan ./misc/shlib make install 889166124Srafan 89066963Speter --with-shlib-version=XXX 89166963Speter Specify whether to use the release or ABI version for shared libraries. 89266963Speter This is normally chosen automatically based on the type of system 89366963Speter which you are building on. We use it for testing the configure script. 89466963Speter 895166124Srafan --with-sysmouse 896166124Srafan use FreeBSD sysmouse interface provide mouse support on the console. 897166124Srafan 89866963Speter --with-system-type=XXX 89966963Speter For testing, override the derived host system-type which is used to 90066963Speter decide things such as the linker commands used to build shared 90166963Speter libraries. This is normally chosen automatically based on the type of 90266963Speter system which you are building on. We use it for testing the configure 90366963Speter script. 90466963Speter 90566963Speter --with-terminfo-dirs=XXX 90666963Speter Specify a search-list of terminfo directories which will be compiled 90766963Speter into the ncurses library (default: DATADIR/terminfo) 90866963Speter 909166124Srafan --with-termlib[=XXX] 91066963Speter When building the ncurses library, organize this as two parts: the 91166963Speter curses library (libncurses) and the low-level terminfo library 91266963Speter (libtinfo). This is done to accommodate applications that use only 91366963Speter the latter. The terminfo library is about half the size of the total. 91466963Speter 915166124Srafan If an option value is given, that overrides the name of the terminfo 916166124Srafan library. For instance, if the wide-character version is built, the 917166124Srafan terminfo library would be named libtinfow. But the libtinfow interface 918166124Srafan is upward compatible from libtinfo, so it would be possible to overlay 919166124Srafan libtinfo.so with a "wide" version of libtinfow.so by renaming it with 920166124Srafan this option. 921166124Srafan 92297049Speter --with-termpath=XXX 92397049Speter Specify a search-list of termcap files which will be compiled into the 92497049Speter ncurses library (default: /etc/termcap:/usr/share/misc/termcap) 92597049Speter 926174993Srafan --with-ticlib[=XXX] 927174993Srafan When building the ncurses library, build a separate library for 928174993Srafan the modules that are used only by the utility programs. Normally 929174993Srafan those would be bundled with the termlib or ncurses libraries. 930174993Srafan 931174993Srafan If an option value is given, that overrides the name of the tic 932174993Srafan library. As in termlib, there is no ABI difference between the 933174993Srafan "wide" libticw.so and libtic.so 934174993Srafan 935184989Srafan NOTE: Overriding the name of the tic library may be useful if you are 936184989Srafan also using the --with-termlib option to rename libtinfo. If you are 937184989Srafan not doing that, renaming the tic library can result in conflicting 938184989Srafan library dependencies for tic and other programs built with the tic 939184989Srafan library. 940184989Srafan 941166124Srafan --with-trace 942166124Srafan Configure the trace() function as part of the all models of the ncurses 943166124Srafan library. Normally it is part of the debug (libncurses_g) library only. 944166124Srafan 945166124Srafan --with-valgrind 946166124Srafan For testing, compile with debug option. 947166124Srafan This also sets the --disable-leaks option. 948166124Srafan 94966963Speter --without-ada 95066963Speter Suppress the configure script's check for Ada95, do not build the 95166963Speter Ada95 binding and related demo. 95266963Speter 95376726Speter --without-curses-h 95476726Speter Don't install the ncurses header with the name "curses.h". Rather, 95576726Speter install as "ncurses.h" and modify the installed headers and manpages 95676726Speter accordingly. 95776726Speter 95866963Speter --without-cxx 95966963Speter XSI curses declares "bool" as part of the interface. C++ also declares 96066963Speter "bool". Neither specifies the size and type of booleans, but both 96166963Speter insist on the same name. We chose to accommodate this by making the 96266963Speter configure script check for the size and type (e.g., unsigned or signed) 96366963Speter that your C++ compiler uses for booleans. If you do not wish to use 96466963Speter ncurses with C++, use this option to tell the configure script to not 96566963Speter adjust ncurses bool to match C++. 96666963Speter 96766963Speter --without-cxx-binding 96866963Speter Suppress the configure script's check for C++, do not build the 96966963Speter C++ binding and related demo. 97066963Speter 971166124Srafan --without-develop 972166124Srafan Disable development options. This does not include those that change 973166124Srafan the interface, such as --enable-widec. 974166124Srafan 975166124Srafan --without-dlsym 976166124Srafan Do not use dlsym() to load GPM dynamically. 977166124Srafan 97866963Speter --without-progs 97966963Speter Tell the configure script to suppress the build of ncurses' application 98066963Speter programs (e.g., tic). The test applications will still be built if you 98166963Speter type "make", though not if you simply do "make install". 98266963Speter 983166124Srafan --without-xterm-new 984166124Srafan Tell the configure script to use "xterm-old" for the entry used in 985166124Srafan the terminfo database. This will work with variations such as 986166124Srafan X11R5 and X11R6 xterm. 98766963Speter 988166124Srafan 98962449SpeterCOMPATIBILITY WITH OLDER VERSIONS OF NCURSES: 99062449Speter-------------------------------------------- 99162449Speter 99262449Speter Because ncurses implements the X/Open Curses Specification, its interface 99362449Speter is fairly stable. That does not mean the interface does not change. 99462449Speter Changes are made to the documented interfaces when we find differences 99562449Speter between ncurses and X/Open or implementations which they certify (such as 99662449Speter Solaris). We add extensions to those interfaces to solve problems not 99762449Speter addressed by the original curses design, but those must not conflict with 99862449Speter the X/Open documentation. 99962449Speter 100062449Speter Here are some of the major interface changes, and related problems which 100162449Speter you may encounter when building a system with different versions of 100262449Speter ncurses: 100362449Speter 1004184989Srafan 5.7 (November 2, 2008) 1005184989Srafan Interface changes: 1006184989Srafan 1007184989Srafan + generate linkable stubs for some macros: 1008184989Srafan getattrs 1009184989Srafan 1010184989Srafan + Add new library configuration for tic-library (the non-curses portion 1011184989Srafan of the ncurses library used for the tic program as well as some 1012184989Srafan others such as tack. There is no API change, but makefiles would be 1013184989Srafan changed to use the tic-library built separately. 1014184989Srafan 1015184989Srafan tack, distributed separately from ncurses, uses some of the internal 1016184989Srafan _nc_XXX functions, which are declared in the tic.h header file. 1017184989Srafan 1018184989Srafan The reason for providing this separate library is that none of the 1019184989Srafan functions in it are suitable for threaded applications. 1020184989Srafan 1021184989Srafan + Add new library configuration (ncursest, ncurseswt) which provides 1022184989Srafan rudimentary support for POSIX threads. This introduces opaque 1023184989Srafan access functions to the WINDOW structure and adds a parameter to 1024184989Srafan several internal functions. 1025184989Srafan 1026184989Srafan + move most internal variables (except tic-library) into data blocks 1027184989Srafan _nc_globals and _nc_prescreen to simplify analysis. Those were 1028184989Srafan globally accessible, but since they were not part of the documented 1029184989Srafan API, there is no ABI change. 1030184989Srafan 1031184989Srafan + changed static tables of strings to be indices into long strings, to 1032184989Srafan improve startup performance. This changes parameter lists for some 1033184989Srafan of the internal functions. 1034184989Srafan 1035184989Srafan Added extensions: 1036184989Srafan 1037184989Srafan + add NCURSES_OPAQUE definition in curses.h to control whether internal 1038184989Srafan details of the WINDOW structure are visible to an application. This 1039184989Srafan is always defined when the threaded library is built, and is optional 1040184989Srafan otherwise. New functions for this: is_cleared, is_idcok, is_idlok, 1041184989Srafan is_immedok, is_keypad, is_leaveok, is_nodelay, is_notimeout, 1042184989Srafan is_scrollok, is_syncok, wgetparent and wgetscrreg. 1043184989Srafan 1044184989Srafan + the threaded library (ncursest) also disallows direct updating of 1045184989Srafan global curses-level variables, providing functions (via macros) for 1046184989Srafan obtaining their value. A few of those variables can be modified by 1047184989Srafan the application, using new functions: set_escdelay, set_tabsize 1048184989Srafan 1049184989Srafan + added functions use_window() and use_screen() which wrap a mutex 1050184989Srafan (if threading is configured) around a call to a user-supplied 1051184989Srafan function. 1052184989Srafan 1053184989Srafan Added internal functions: 1054184989Srafan _nc_get_alias_table 1055184989Srafan _nc_get_screensize 1056184989Srafan _nc_keyname 1057184989Srafan _nc_screen_of 1058184989Srafan _nc_set_no_padding 1059184989Srafan _nc_tracechar 1060184989Srafan _nc_tracemouse 1061184989Srafan _nc_unctrl 1062184989Srafan _nc_ungetch 1063184989Srafan 1064184989Srafan These are used for leak-testing, and are stubs for 1065184989Srafan ABI compatibility when ncurses is not configured for that 1066184989Srafan using the --disable-leaks configure script option: 1067184989Srafan 1068184989Srafan _nc_free_and_exit 1069184989Srafan _nc_leaks_tinfo 1070184989Srafan 1071184989Srafan Removed internal functions: 1072184989Srafan none 1073184989Srafan 1074184989Srafan Modified internal functions: 1075184989Srafan _nc_fifo_dump 1076184989Srafan _nc_find_entry 1077184989Srafan _nc_handle_sigwinch 1078184989Srafan _nc_init_keytry 1079184989Srafan _nc_keypad 1080184989Srafan _nc_locale_breaks_acs 1081184989Srafan _nc_timed_wait 1082184989Srafan _nc_update_screensize 1083184989Srafan 1084184989Srafan Use new typedef TRIES to replace "struct tries": 1085184989Srafan 1086184989Srafan _nc_add_to_try 1087184989Srafan _nc_expand_try 1088184989Srafan _nc_remove_key 1089184989Srafan _nc_remove_string 1090184989Srafan _nc_trace_tries 1091184989Srafan 1092166124Srafan 5.6 (December 17, 2006) 1093166124Srafan Interface changes: 1094166124Srafan 1095166124Srafan + generate linkable stubs for some macros: 1096166124Srafan 1097166124Srafan getbegx, getbegy, getcurx, getcury, getmaxx, getmaxy, getparx, 1098166124Srafan getpary, getpary, 1099166124Srafan 1100166124Srafan and (for libncursesw) 1101166124Srafan 1102166124Srafan wgetbkgrnd 1103166124Srafan 1104166124Srafan Added extensions: 1105166124Srafan nofilter() 1106166124Srafan use_legacy_coding() 1107166124Srafan 1108166124Srafan Added internal functions: 1109166124Srafan _nc_first_db 1110166124Srafan _nc_get_source 1111166124Srafan _nc_handle_sigwinch 1112166124Srafan _nc_is_abs_path 1113166124Srafan _nc_is_dir_path 1114166124Srafan _nc_is_file_path 1115166124Srafan _nc_keep_tic_dir 1116166124Srafan _nc_keep_tic_dir 1117166124Srafan _nc_last_db 1118166124Srafan _nc_next_db 1119166124Srafan _nc_read_termtype 1120166124Srafan _nc_tic_dir 1121166124Srafan 1122166124Srafan Also (if using the hashed database configuration): 1123166124Srafan 1124166124Srafan _nc_db_close 1125166124Srafan _nc_db_first 1126166124Srafan _nc_db_get 1127166124Srafan _nc_db_have_data 1128166124Srafan _nc_db_have_index 1129166124Srafan _nc_db_next 1130166124Srafan _nc_db_open 1131166124Srafan _nc_db_put 1132166124Srafan 1133166124Srafan otherwise 1134166124Srafan 1135166124Srafan _nc_hashed_db 1136166124Srafan 1137166124Srafan Removed internal functions: 1138166124Srafan none 1139166124Srafan 1140166124Srafan Modified internal functions: 1141166124Srafan _nc_add_to_try 1142166124Srafan _nc_do_color 1143166124Srafan _nc_expand_try 1144166124Srafan _nc_remove_key 1145166124Srafan _nc_setupscreen 1146166124Srafan 1147166124Srafan 5.5 (October 10, 2005) 1148166124Srafan Interface changes: 1149166124Srafan 1150166124Srafan + terminfo installs "xterm-new" as "xterm" entry rather than 1151166124Srafan "xterm-old" (aka xterm-r6). 1152166124Srafan 1153166124Srafan + terminfo data is installed using the tic -x option (few systems 1154166124Srafan still use ncurses 4.2). 1155166124Srafan 1156166124Srafan + modify C++ binding to work with newer C++ compilers by providing 1157166124Srafan initializers and using modern casts. Old-style header names are 1158166124Srafan still used in this release to allow compiling with not-so-old 1159166124Srafan compilers. 1160166124Srafan 1161166124Srafan + form and menu libraries now work with wide-character data. 1162166124Srafan Applications which bypassed the form library and manipulated the 1163166124Srafan FIELD.buf data directly will not work properly with libformw, since 1164166124Srafan that no longer points to an array of char. The set_field_buffer() 1165166124Srafan and field_buffer() functions translate to/from the actual field 1166166124Srafan data. 1167166124Srafan 1168166124Srafan + change SP->_current_attr to a pointer, adjust ifdef's to ensure that 1169166124Srafan libtinfo.so and libtinfow.so have the same ABI. The reason for this 1170166124Srafan is that the corresponding data which belongs to the upper-level 1171166124Srafan ncurses library has a different size in each model. 1172166124Srafan 1173166124Srafan + winnstr() now returns multibyte character strings for the 1174166124Srafan wide-character configuration. 1175166124Srafan 1176166124Srafan + assume_default_colors() no longer requires that use_default_colors() 1177166124Srafan be called first. 1178166124Srafan 1179166124Srafan + data_ahead() now works with wide-characters. 1180166124Srafan 1181166124Srafan + slk_set() and slk_wset() now accept and store multibyte or 1182166124Srafan multicolumn characters. 1183166124Srafan 1184166124Srafan + start_color() now returns OK if colors have already been started. 1185166124Srafan start_color() also returns ERR if it cannot allocate memory. 1186166124Srafan 1187166124Srafan + pair_content() now returns -1 for consistency with init_pair() if it 1188166124Srafan corresponds to the default-color. 1189166124Srafan 1190166124Srafan + unctrl() now returns null if its parameter does not correspond 1191166124Srafan to an unsigned char. 1192166124Srafan 1193166124Srafan Added extensions: 1194166124Srafan Experimental mouse version 2 supports wheel mice with buttons 1195166124Srafan 4 and 5. This requires ABI 6 because it modifies the encoding 1196166124Srafan of mouse events. 1197166124Srafan 1198166124Srafan Experimental extended colors allows encoding of 256 foreground 1199166124Srafan and background colors, e.g., with the xterm-256color or 1200166124Srafan xterm-88color terminfo entries. This requires ABI 6 because 1201166124Srafan it changes the size of cchar_t. 1202166124Srafan 1203166124Srafan Added internal functions: 1204166124Srafan _nc_check_termtype2 1205166124Srafan _nc_resolve_uses2 1206166124Srafan _nc_retrace_cptr 1207166124Srafan _nc_retrace_cvoid_ptr 1208166124Srafan _nc_retrace_void_ptr 1209166124Srafan _nc_setup_term 1210166124Srafan 1211166124Srafan Removed internal functions: 1212166124Srafan none 1213166124Srafan 1214166124Srafan Modified internal functions: 1215166124Srafan _nc_insert_ch 1216166124Srafan _nc_save_str 1217166124Srafan _nc_trans_string 1218166124Srafan 1219166124Srafan 5.4 (February 8, 2004) 1220166124Srafan Interface changes: 1221166124Srafan 1222166124Srafan + add the remaining functions for X/Open curses wide-character support. 1223166124Srafan These are only available if the library is configured using the 1224166124Srafan --enable-widec option. 1225166124Srafan pecho_wchar() 1226166124Srafan slk_wset() 1227166124Srafan 1228166124Srafan + write getyx() and related 2-return macros in terms of getcury(), 1229166124Srafan getcurx(), etc. 1230166124Srafan 1231166124Srafan + simplify ifdef for bool declaration in curses.h 1232166124Srafan 1233166124Srafan + modify ifdef's in curses.h that disabled use of __attribute__() for 1234166124Srafan g++, since recent versions implement the cases which ncurses uses. 1235166124Srafan 1236166124Srafan + change some interfaces to use const: 1237166124Srafan define_key() 1238166124Srafan mvprintw() 1239166124Srafan mvwprintw() 1240166124Srafan printw() 1241166124Srafan vw_printw() 1242166124Srafan winsnstr() 1243166124Srafan wprintw() 1244166124Srafan 1245166124Srafan Added extensions: 1246166124Srafan key_defined() 1247166124Srafan 1248166124Srafan Added internal functions: 1249166124Srafan _nc_get_locale() 1250166124Srafan _nc_insert_ch() 1251166124Srafan _nc_is_charable() wide 1252166124Srafan _nc_locale_breaks_acs() 1253166124Srafan _nc_pathlast() 1254166124Srafan _nc_to_char() wide 1255166124Srafan _nc_to_widechar() wide 1256166124Srafan _nc_tparm_analyze() 1257166124Srafan _nc_trace_bufcat() debug 1258166124Srafan _nc_unicode_locale() 1259166124Srafan 1260166124Srafan Removed internal functions: 1261166124Srafan _nc_outstr() 1262166124Srafan _nc_sigaction() 1263166124Srafan 1264166124Srafan Modified internal functions: 1265166124Srafan _nc_remove_string() 1266166124Srafan _nc_retrace_chtype() 1267166124Srafan 1268166124Srafan 5.3 (October 12, 2002) 1269166124Srafan Interface changes: 1270166124Srafan 1271166124Srafan + change type for bool used in headers to NCURSES_BOOL, which usually 1272166124Srafan is the same as the compiler's definition for 'bool'. 1273166124Srafan 1274166124Srafan + add all but two functions for X/Open curses wide-character support. 1275166124Srafan These are only available if the library is configured using the 1276166124Srafan --enable-widec option. Missing functions are 1277166124Srafan pecho_wchar() 1278166124Srafan slk_wset() 1279166124Srafan 1280166124Srafan + add environment variable $NCURSES_ASSUMED_COLORS to modify the 1281166124Srafan assume_default_colors() extension. 1282166124Srafan 1283166124Srafan Added extensions: 1284166124Srafan is_term_resized() 1285166124Srafan resize_term() 1286166124Srafan 1287166124Srafan Added internal functions: 1288166124Srafan _nc_altcharset_name() debug 1289166124Srafan _nc_reset_colors() 1290166124Srafan _nc_retrace_bool() debug 1291166124Srafan _nc_retrace_unsigned() debug 1292166124Srafan _nc_rootname() 1293166124Srafan _nc_trace_ttymode() debug 1294166124Srafan _nc_varargs() debug 1295166124Srafan _nc_visbufn() debug 1296166124Srafan _nc_wgetch() 1297166124Srafan 1298166124Srafan Removed internal functions: 1299166124Srafan _nc_background() 1300166124Srafan 1301166124Srafan Modified internal functions: 1302166124Srafan _nc_freeall() debug 1303166124Srafan 130476726Speter 5.2 (October 21, 2000) 130576726Speter Interface changes: 130676726Speter 130776726Speter + revert termcap ospeed variable to 'short' (see discussion of the 130876726Speter --with-ospeed configure option). 130976726Speter 131066963Speter 5.1 (July 8, 2000) 131166963Speter Interface changes: 131262449Speter 131366963Speter + made the extended terminal capabilities 131466963Speter (configure --enable-tcap-names) a standard feature. This should 131566963Speter be transparent to applications that do not require it. 131666963Speter 131766963Speter + removed the trace() function and related trace support from the 131866963Speter production library. 131966963Speter 132066963Speter + modified curses.h.in, undef'ing some symbols to avoid conflict 132166963Speter with C++ STL. 132266963Speter 132366963Speter Added extensions: assume_default_colors(). 132466963Speter 132566963Speter 5.0 (October 23, 1999) 132666963Speter Interface changes: 132766963Speter 132862449Speter + implemented the wcolor_set() and slk_color() functions. 132962449Speter 133062449Speter + move macro winch to a function, to hide details of struct ldat 133162449Speter 133262449Speter + corrected prototypes for slk_* functions, using chtype rather than 133362449Speter attr_t. 133462449Speter 133562449Speter + the slk_attr_{set,off,on} functions need an additional void* 133662449Speter parameter according to XSI. 133762449Speter 133862449Speter + modified several prototypes to correspond with 1997 version of X/Open 133962449Speter Curses: [w]attr_get(), [w]attr_set(), border_set() have different 134066963Speter parameters. Some functions were renamed or misspelled: 134162449Speter erase_wchar(), in_wchntr(), mvin_wchntr(). Some developers have used 134262449Speter attr_get(). 134362449Speter 134462449Speter Added extensions: keybound(), curses_version(). 134562449Speter 134662449Speter Terminfo database changes: 134762449Speter 134862449Speter + change translation for termcap 'rs' to terminfo 'rs2', which is 134962449Speter the documented equivalent, rather than 'rs1'. 135062449Speter 135162449Speter The problems are subtler in recent releases. 135262449Speter 135362449Speter a) This release provides users with the ability to define their own 135462449Speter terminal capability extensions, like termcap. To accomplish this, 135562449Speter we redesigned the TERMTYPE struct (in term.h). Very few 135662449Speter applications use this struct. They must be recompiled to work with 135762449Speter the 5.0 library. 135862449Speter 135962449Speter a) If you use the extended terminfo names (i.e., you used configure 136062449Speter --enable-tcap-names), the resulting terminfo database can have some 136162449Speter entries which are not readable by older versions of ncurses. This 136262449Speter is a bug in the older versions: 136362449Speter 136462449Speter + the terminfo database stores booleans, numbers and strings in 136562449Speter arrays. The capabilities that are listed in the arrays are 136662449Speter specified by X/Open. ncurses recognizes a number of obsolete and 136762449Speter extended names which are stored past the end of the specified 136862449Speter entries. 136962449Speter 137062449Speter + a change to read_entry.c in 951001 made the library do an lseek() 137162449Speter call incorrectly skipping data which is already read from the 137262449Speter string array. This happens when the number of strings in the 137362449Speter terminfo data file is greater than STRCOUNT, the number of 137462449Speter specified and obsolete or extended strings. 137562449Speter 137662449Speter + as part of alignment with the X/Open final specification, in the 137762449Speter 990109 patch we added two new terminfo capabilities: 137862449Speter set_a_attributes and set_pglen_inch). This makes the indices for 137962449Speter the obsolete and extended capabilities shift up by 2. 138062449Speter 138162449Speter + the last two capabilities in the obsolete/extended list are memu 138262449Speter and meml, which are found in most terminfo descriptions for xterm. 138362449Speter 138462449Speter When trying to read this terminfo entry, the spurious lseek() 138562449Speter causes the library to attempt to read the final portion of the 138662449Speter terminfo data (the text of the string capabilities) 4 characters 138762449Speter past its starting point, and reads 4 characters too few. The 138862449Speter library rejects the data, and applications are unable to 138962449Speter initialize that terminal type. 139062449Speter 139162449Speter FIX: remove memu and meml from the xterm description. They are 139262449Speter obsolete, not used by ncurses. (It appears that the feature was 139362449Speter added to xterm to make it more like hpterm). 139462449Speter 139562449Speter This is not a problem if you do not use the -x option of tic to 139662449Speter create a terminfo database with extended names. Note that the 139762449Speter user-defined terminal capabilities are not affected by this bug, 139862449Speter since they are stored in a table after the older terminfo data ends, 139962449Speter and are invisible to the older libraries. 140062449Speter 140162449Speter c) Some developers did not wish to use the C++ binding, and used the 140262449Speter configure --without-cxx option. This causes problems if someone 140362449Speter uses the ncurses library from C++ because that configure test 140462449Speter determines the type for C++'s bool and makes ncurses match it, since 140562449Speter both C++ and curses are specified to declare bool. Calling ncurses 140662449Speter functions with the incorrect type for bool will cause execution 140762449Speter errors. In 5.0 we added a configure option "--without-cxx-binding" 140862449Speter which controls whether the binding itself is built and installed. 140962449Speter 141066963Speter 4.2 (March 2, 1998) 141166963Speter Interface changes: 141262449Speter 141362449Speter + correct prototype for termattrs() as per XPG4 version 2. 141462449Speter 141562449Speter + add placeholder prototypes for color_set(), erasewchar(), 141662449Speter term_attrs(), wcolor_set() as per XPG4 version 2. 141762449Speter 141862449Speter + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in 141962449Speter SVr4 headers. 142062449Speter 142162449Speter New extensions: keyok() and define_key(). 142262449Speter 142362449Speter Terminfo database changes: 142462449Speter 142562449Speter + corrected definition in curses.h for ACS_LANTERN, which was 'I' 142662449Speter rather than 'i'. 142762449Speter 142862449Speter 4.1 (May 15, 1997) 142962449Speter 143062449Speter We added these extensions: use_default_colors(). Also added 143162449Speter configure option --enable-const, to support the use of const where 143262449Speter X/Open should have, but did not, specify. 143362449Speter 143462449Speter The terminfo database content changed the representation of color for 143562449Speter most entries that use ANSI colors. SVr4 curses treats the setaf/setab 143662449Speter and setf/setb capabilities differently, interchanging the red/blue 143762449Speter colors in the latter. 143862449Speter 143962449Speter 4.0 (December 24, 1996) 144062449Speter 144162449Speter We bumped to version 4.0 because the newly released dynamic loader 144262449Speter (ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL 144362449Speter versions were inconsistent. At that point, ncurses ABI was 3.4 and the 144462449Speter REL was 1.9.9g, so we made them consistent. 144562449Speter 144662449Speter 1.9.9g (December 1, 1996) 144762449Speter 144866963Speter This fixed most of the problems with 1.9.9e, and made these interface 144962449Speter changes: 145062449Speter 145162449Speter + remove tparam(), which had been provided for compatibility with 145262449Speter some termcap. tparm() is standard, and does not conflict with 145362449Speter application's fallback for missing tparam(). 145462449Speter 145562449Speter + turn off hardware echo in initscr(). This changes the sense of the 145662449Speter echo() function, which was initialized to echoing rather than 145762449Speter nonechoing (the latter is specified). There were several other 145862449Speter corrections to the terminal I/O settings which cause applications to 145962449Speter behave differently. 146062449Speter 146162449Speter + implemented several functions (such as attr_on()) which were 146262449Speter available only as macros. 146362449Speter 146462449Speter + corrected several typos in curses.h.in (i.e., the mvXXXX macros). 146562449Speter 146662449Speter + corrected prototypes for delay_output(), 146762449Speter has_color, immedok() and idcok(). 146862449Speter 146962449Speter + corrected misspelled getbkgd(). Some applications used the 147062449Speter misspelled name. 147162449Speter 147262449Speter + added _yoffset to WINDOW. The size of WINDOW does not impact 147362449Speter applications, since they use only pointers to WINDOW structs. 147462449Speter 147562449Speter These changes were made to the terminfo database: 147662449Speter 147762449Speter + removed boolean 'getm' which was available as an extended name. 147862449Speter 147962449Speter We added these extensions: wresize(), resizeterm(), has_key() and 148062449Speter mcprint(). 148162449Speter 148262449Speter 1.9.9e (March 24, 1996) 148362449Speter 148462449Speter not recommended (a last-minute/untested change left the forms and 148566963Speter menus libraries unusable since they do not repaint the screen). 148662449Speter Foreground/background colors are combined incorrectly, working properly 148762449Speter only on a black background. When this was released, the X/Open 148862449Speter specification was available only in draft form. 148962449Speter 149062449Speter Some applications (such as lxdialog) were "fixed" to work with the 149162449Speter incorrect color scheme. 149262449Speter 149362449Speter 149450276SpeterIF YOU ARE A SYSTEM INTEGRATOR: 149562449Speter------------------------------ 149650276Speter 149750276Speter Configuration and Installation: 149850276Speter 1499166124Srafan On platforms where ncurses is assumed to be installed in /usr/lib, 1500166124Srafan the configure script uses "/usr" as a default: 150150276Speter 1502166124Srafan Linux, FreeBSD, NetBSD, OpenBSD, Cygwin 150350276Speter 1504166124Srafan For other platforms, the default is "/usr/local". See the discussion 1505166124Srafan of the "--disable-overwrite" option. 150650276Speter 1507166124Srafan The location of the terminfo is set indirectly by the "--datadir" 1508166124Srafan configure option, e.g., /usr/share/terminfo, given a datadir of 1509166124Srafan /usr/share. You may want to override this if you are installing 1510166124Srafan ncurses libraries in nonstandard locations, but wish to share the 1511166124Srafan terminfo database. 1512166124Srafan 1513166124Srafan Normally the ncurses library is configured in a pure-terminfo mode; 1514166124Srafan that is, with the --disable-termcap option. This makes the ncurses 1515166124Srafan library smaller and faster. The ncurses library includes a termcap 1516166124Srafan emulation that queries the terminfo database, so even applications that 1517166124Srafan use raw termcap to query terminal characteristics will win (providing 1518166124Srafan you recompile and relink them!). 1519166124Srafan 1520166124Srafan If you must configure with termcap fallback enabled, you may also wish 1521166124Srafan to use the --enable-getcap option. This speeds up termcap-based 1522166124Srafan startups, at the expense of not allowing personal termcap entries to 1523166124Srafan reference the terminfo tree. See comments in 1524166124Srafan ncurses/tinfo/read_termcap.c for further details. 1525166124Srafan 152650276Speter Note that if you have $TERMCAP set, ncurses will use that value 152750276Speter to locate termcap data. In particular, running from xterm will 152850276Speter set $TERMCAP to the contents of the xterm's termcap entry. 152950276Speter If ncurses sees that, it will not examine /etc/termcap. 153050276Speter 153150276Speter Keyboard Mapping: 153250276Speter 153350276Speter The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48 153450276Speter reverse-tabulation sequence) rather than ^I. Here are the loadkeys -d 153550276Speter mappings that will set this up: 153650276Speter 153766963Speter keycode 15 = Tab Tab 153850276Speter alt keycode 15 = Meta_Tab 153950276Speter shift keycode 15 = F26 154050276Speter string F26 ="\033[Z" 154150276Speter 154250276Speter Naming the Console Terminal 154350276Speter 1544166124Srafan In various systems there has been a practice of designating the system 1545166124Srafan console driver type as `console'. Please do not do this! It 1546166124Srafan complicates peoples' lives, because it can mean that several different 1547166124Srafan terminfo entries from different operating systems all logically want to 1548166124Srafan be called `console'. 154950276Speter 155050276Speter Please pick a name unique to your console driver and set that up 155150276Speter in the /etc/inittab table or local equivalent. Send the entry to the 155250276Speter terminfo maintainer (listed in the misc/terminfo file) to be included 155350276Speter in the terminfo file, if it's not already there. See the 155450276Speter term(7) manual page included with this distribution for more on 155550276Speter conventions for choosing type names. 155650276Speter 155750276Speter Here are some recommended primary console names: 155850276Speter 155950276Speter linux -- Linux console driver 156050276Speter freebsd -- FreeBSD 156150276Speter netbsd -- NetBSD 156250276Speter bsdos -- BSD/OS 156350276Speter 156450276Speter If you are responsible for integrating ncurses for one of these 156550276Speter distribution, please either use the recommended name or get back 156650276Speter to us explaining why you don't want to, so we can work out nomenclature 156750276Speter that will make users' lives easier rather than harder. 156850276Speter 156962449Speter 157062449SpeterRECENT XTERM VERSIONS: 157162449Speter--------------------- 157262449Speter 157350276Speter The terminfo database file included with this distribution assumes you 1574166124Srafan are running a modern xterm based on XFree86 (i.e., xterm-new). The 1575166124Srafan earlier X11R6 entry (xterm-r6) and X11R5 entry (xterm-r5) is provided 1576166124Srafan as well. See the --without-xterm-new configure script option if you 1577166124Srafan are unable to update your system. 157850276Speter 157950276Speter 158062449SpeterCONFIGURING FALLBACK ENTRIES: 158162449Speter---------------------------- 158262449Speter 158350276Speter In order to support operation of ncurses programs before the terminfo 158450276Speter tree is accessible (that is, in single-user mode or at OS installation 158550276Speter time) the ncurses library can be compiled to include an array of 1586166124Srafan pre-fetched fallback entries. This must be done on a machine which 1587166124Srafan has ncurses' infocmp and terminfo database installed. 158850276Speter 158950276Speter These entries are checked by setupterm() only when the conventional 159050276Speter fetches from the terminfo tree and the termcap fallback (if configured) 159150276Speter have been tried and failed. Thus, the presence of a fallback will not 159250276Speter shadow modifications to the on-disk entry for the same type, when that 159350276Speter entry is accessible. 159450276Speter 1595166124Srafan By default, there are no entries on the fallback list. After you have 1596166124Srafan built the ncurses suite for the first time, you can change the list 1597166124Srafan (the process needs infocmp(1)). To do so, use the script 1598166124Srafan ncurses/tinfo/MKfallback.sh. A configure script option 1599166124Srafan --with-fallbacks does this (it accepts a comma-separated list of the 1600166124Srafan names you wish, and does not require a rebuild). 160150276Speter 160250276Speter If you wanted (say) to have linux, vt100, and xterm fallbacks, you 160350276Speter would use the commands 160450276Speter 160550276Speter cd ncurses; 1606166124Srafan tinfo/MKfallback.sh linux vt100 xterm >fallback.c 160750276Speter 160850276Speter Then just rebuild and reinstall the library as you would normally. 160950276Speter You can restore the default empty fallback list with 161050276Speter 1611166124Srafan tinfo/MKfallback.sh >fallback.c 161250276Speter 161350276Speter The overhead for an empty fallback list is one trivial stub function. 161450276Speter Any non-empty fallback list is const-ed and therefore lives in sharable 161550276Speter text space. You can look at the comment trailing each initializer in 161650276Speter the generated ncurses/fallback.c file to see the core cost of the 161750276Speter fallbacks. A good rule of thumb for modern vt100-like entries is that 161850276Speter each one will cost about 2.5K of text space. 161950276Speter 162062449Speter 162150276SpeterBSD CONVERSION NOTES: 162262449Speter-------------------- 162362449Speter 162450276Speter If you need to support really ancient BSD programs, you probably 162550276Speter want to configure with the --enable-bsdpad option. What this does 162650276Speter is enable code in tputs() that recognizes a numeric prefix on a 162750276Speter capability as a request for that much trailing padding in milliseconds. 162850276Speter There are old BSD programs that do things like tputs("50"). 162950276Speter 163050276Speter (If you are distributing ncurses as a support-library component of 163150276Speter an application you probably want to put the remainder of this section 163250276Speter in the package README file.) 163350276Speter 163466963Speter The following note applies only if you have configured ncurses with 163550276Speter --enable-termcap. 163650276Speter 163750276Speter------------------------------- CUT HERE -------------------------------- 163850276Speter 163950276SpeterIf you are installing this application privately (either because you 164050276Speterhave no root access or want to experiment with it before doing a root 164150276Speterinstallation), there are a couple of details you need to be aware of. 164250276SpeterThey have to do with the ncurses library, which uses terminfo rather 164350276Speterthan termcap for describing terminal characteristics. 164450276Speter 164550276SpeterThough the ncurses library is terminfo-based, it will interpret your 164650276SpeterTERMCAP variable (if present), any local termcap files you reference 164750276Speterthrough it, and the system termcap file. However, in order to avoid 164850276Speterslowing down your application startup, it will only do this once per 164950276Speterterminal type! 165050276Speter 165150276SpeterThe first time you load a given terminal type from your termcap 165250276Speterdatabase, the library initialization code will automatically write it 165350276Speterin terminfo format to a subdirectory under $HOME/.terminfo. After 165450276Speterthat, the initialization code will find it there and do a (much 165550276Speterfaster) terminfo fetch. 165650276Speter 165750276SpeterUsually, all this means is that your home directory will silently grow 165850276Speteran invisible .terminfo subdirectory which will get filled in with 165950276Speterterminfo descriptions of terminal types as you invoke them. If anyone 166050276Speterever installs a global terminfo tree on your system, this will quietly 166150276Speterstop happening and your $HOME/.terminfo will become redundant. 166250276Speter 166350276SpeterThe objective of all this logic is to make converting from BSD termcap 166450276Speteras painless as possible without slowing down your application (termcap 166550276Spetercompilation is expensive). 166650276Speter 166750276SpeterIf you don't have a TERMCAP variable or custom personal termcap file, 166850276Speteryou can skip the rest of this dissertation. 166950276Speter 167050276SpeterIf you *do* have a TERMCAP variable and/or a custom personal termcap file 167150276Speterthat defines a terminal type, that definition will stop being visible 167250276Speterto this application after the first time you run it, because it will 167350276Speterinstead see the terminfo entry that it wrote to $HOME/terminfo the 167450276Speterfirst time around. 167550276Speter 167650276SpeterSubsequently, editing the TERMCAP variable or personal TERMCAP file 167750276Speterwill have no effect unless you explicitly remove the terminfo entry 167850276Speterunder $HOME/terminfo. If you do that, the entry will be recompiled 167950276Speterfrom your termcap resources the next time it is invoked. 168050276Speter 168150276SpeterTo avoid these complications, use infocmp(1) and tic(1) to edit the 168250276Speterterminfo directory directly. 168350276Speter 168450276Speter------------------------------- CUT HERE -------------------------------- 168550276Speter 168650276SpeterUSING NCURSES WITH AFS: 168750276Speter AFS treats each directory as a separate logical filesystem, you 168850276Speter can't hard-link across them. The --enable-symlinks option copes 168950276Speter with this by making tic use symbolic links. 169050276Speter 169150276SpeterUSING NCURSES WITH GPM: 1692166124Srafan Ncurses 4.1 and up can be configured to use GPM (General Purpose 1693166124Srafan Mouse) which is used on Linux console. Be aware that GPM is commonly 169450276Speter installed as a shared library which contains a wrapper for the curses 169550276Speter wgetch() function (libcurses.o). Some integrators have simplified 1696166124Srafan linking applications by combining all or part of libcurses.so into the 1697166124Srafan libgpm.so file, producing symbol conflicts with ncurses (specifically 1698166124Srafan the wgetch function). This was originally the BSD curses, but 1699166124Srafan generally whatever curses library exists on the system. 170050276Speter 1701166124Srafan You may be able to work around this problem by linking as follows: 1702166124Srafan 170350276Speter cc -o foo foo.o -lncurses -lgpm -lncurses 170450276Speter 170550276Speter but the linker may not cooperate, producing mysterious errors. 1706166124Srafan See the FAQ, as well as the discussion under the --with-gpm option: 170750276Speter 1708166124Srafan http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib 170950276Speter 171066963SpeterBUILDING NCURSES WITH A CROSS-COMPILER 171166963Speter Ncurses can be built with a cross-compiler. Some parts must be built 171266963Speter with the host's compiler since they are used for building programs 171366963Speter (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables 1714166124Srafan that are compiled into the ncurses library. The essential thing to do 1715166124Srafan is set the BUILD_CC environment variable to your host's compiler, and 1716166124Srafan run the configure script configuring for the cross-compiler. 171750276Speter 1718166124Srafan The configure options --with-build-cc, etc., are provided to make this 1719166124Srafan simpler. Since make_hash and make_keys use only ANSI C features, it 1720166124Srafan is normally not necessary to provide the other options such as 1721166124Srafan --with-build-libs, but they are provided for completeness. 1722166124Srafan 172366963Speter Note that all of the generated source-files which are part of ncurses 172466963Speter will be made if you use 172550276Speter 172666963Speter make sources 172750276Speter 172866963Speter This would be useful in porting to an environment which has little 172966963Speter support for the tools used to generate the sources, e.g., sed, awk and 173066963Speter Bourne-shell. 173166963Speter 1732166124Srafan When ncurses has been successfully cross-compiled, you may want to use 1733166124Srafan "make install" (with a suitable target directory) to construct an 1734166124Srafan install tree. Note that in this case (as with the --with-fallbacks 1735166124Srafan option), ncurses uses the development platform's tic to do the 1736166124Srafan "make install.data" portion. 1737166124Srafan 173850276SpeterBUGS: 173950276Speter Send any feedback to the ncurses mailing list at 174062449Speter bug-ncurses@gnu.org. To subscribe send mail to 174162449Speter bug-ncurses-request@gnu.org with body that reads: 174250276Speter subscribe ncurses <your-email-address-here> 174350276Speter 174466963Speter The Hacker's Guide in the doc directory includes some guidelines 174550276Speter on how to report bugs in ways that will get them fixed most quickly. 1746166124Srafan 1747166124Srafan-- vile:txtmode 1748