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