1 -- $Id: INSTALL,v 1.98 2005/10/09 14:09:37 tom Exp $
2 ---------------------------------------------------------------------
3 How to install Ncurses/Terminfo on your system
4 ---------------------------------------------------------------------
6 ************************************************************
7 * READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
8 ************************************************************
10 You should be reading the file INSTALL in a directory called ncurses-d.d, where
11 d.d is the current version number. There should be several subdirectories,
12 including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
13 and `test'. See the README file for a roadmap to the package.
15 If you are a Linux or FreeBSD or NetBSD distribution integrator or packager,
16 please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR
19 If you are converting from BSD curses and do not have root access, be sure
20 to read the BSD CONVERSION NOTES section below.
22 If you are trying to build applications using gpm with ncurses,
23 read the USING NCURSES WITH GPM section below.
25 If you are running over the Andrew File System see the note below on
26 USING NCURSES WITH AFS.
28 If you are cross-compiling, see the note below on BUILDING NCURSES WITH A
31 If you want to build the Ada95 binding, go to the Ada95 directory and
32 follow the instructions there. The Ada95 binding is not covered below.
34 If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based
35 i386 Unixes, go read the Portability section in the TO-DO file before you
42 You will need the following to build and install ncurses under UNIX:
44 * ANSI C compiler (gcc, for instance)
46 * awk (mawk or gawk will do)
48 * BSD or System V style install (a script is enclosed)
50 Ncurses has been also built in the OS/2 EMX environment.
53 INSTALLATION PROCEDURE:
54 ----------------------
56 1. First, decide whether you want ncurses to replace your existing library (in
57 which case you'll need super-user privileges) or be installed in parallel
60 The --prefix option to configure changes the root directory for installing
61 ncurses. The default is normally in subdirectories of /usr/local, except
62 for systems where ncurses is normally installed as a system library, e.g.,
63 Linux, the various BSD systems and Cygwin. Use --prefix=/usr to replace
64 your default curses distribution.
66 The package gets installed beneath the --prefix directory as follows:
68 In $(prefix)/bin: tic, infocmp, captoinfo, tset,
69 reset, clear, tput, toe
70 In $(prefix)/lib: libncurses*.* libcurses.a
71 In $(prefix)/share/terminfo: compiled terminal descriptions
72 In $(prefix)/include: C header files
73 Under $(prefix)/man: the manual pages
75 Note that the configure script attempts to locate previous installation of
76 ncurses, and will set the default prefix according to where it finds the
79 Do not use commands such as
81 make install prefix=XXX
83 to change the prefix after configuration, since the prefix value is used
84 for some absolute pathnames such as TERMINFO. Instead do this
86 make install DESTDIR=XXX
88 See also the discussion of --with-install-prefix.
90 2. Type `./configure' in the top-level directory of the distribution to
91 configure ncurses for your operating system and create the Makefiles.
92 Besides --prefix, various configuration options are available to customize
93 the installation; use `./configure --help' to list the available options.
95 If your operating system is not supported, read the PORTABILITY section in
96 the file ncurses/README for information on how to create a configuration
99 The `configure' script generates makefile rules for one or more object
100 models and their associated libraries:
102 libncurses.a (normal)
104 libcurses.a (normal, a link to libncurses.a)
105 This gets left out if you configure with --disable-overwrite.
107 libncurses.so (shared)
109 libncurses_g.a (debug)
111 libncurses_p.a (profile)
113 libncurses.la (libtool)
115 If you configure using the --enable-widec option, a "w" is appended to the
116 library names (e.g., libncursesw.a), and the resulting libraries support
117 wide-characters, e.g., via a UTF-8 locale. The corresponding header files
118 are compatible with the non-wide-character configuration; wide-character
119 features are provided by ifdef's in the header files. The wide-character
120 library interfaces are not binary-compatible with the non-wide-character
121 version. Building and running the wide-character code relies on a fairly
122 recent implementation of libiconv. We have built this configuration on
123 Linux using libiconv, sometimes requiring libutf8.
125 If you do not specify any models, the normal and debug libraries will be
126 configured. Typing `configure' with no arguments is equivalent to:
128 ./configure --with-normal --with-debug --enable-overwrite
132 ./configure --with-shared
134 makes the shared libraries the default, resulting in
136 ./configure --with-shared --with-normal --with-debug --enable-overwrite
138 If you want only shared libraries, type
140 ./configure --with-shared --without-normal --without-debug
142 Rules for generating shared libraries are highly dependent upon the choice
143 of host system and compiler. We've been testing shared libraries on Linux
144 and SunOS with gcc, but more work needs to be done to make shared libraries
145 work on other systems.
147 If you have libtool installed, you can type
149 ./configure --with-libtool
151 to generate the appropriate static and/or shared libraries for your
152 platform using libtool.
154 You can make curses and terminfo fall back to an existing file of termcap
155 definitions by configuring with --enable-termcap. If you do this, the
156 library will search /etc/termcap before the terminfo database, and will
157 also interpret the contents of the TERM environment variable. See the
158 section BSD CONVERSION NOTES below.
160 3. Type `make'. Ignore any warnings, no error messages should be produced.
161 This should compile the ncurses library, the terminfo compiler tic(1),
162 captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
163 programs (see the manual pages for explanation of what they do), some test
164 programs, and the panels, menus, and forms libraries.
166 4. Run ncurses and several other test programs in the test directory to
167 verify that ncurses functions correctly before doing an install that
168 may overwrite system files. Read the file test/README for details on
171 NOTE: You must have installed the terminfo database, or set the
172 environment variable $TERMINFO to point to a SVr4-compatible terminfo
173 database before running the test programs. Not all vendors' terminfo
174 databases are SVr4-compatible, but most seem to be. Exceptions include
175 DEC's Digital Unix (formerly known as OSF/1).
177 If you run the test programs WITHOUT installing terminfo, ncurses may
178 read the termcap file and cache that in $HOME/.terminfo, which will
179 thereafter be used instead of the terminfo database. See the comments
180 on "--enable-getcap-cache", to see why this is a Bad Thing.
182 It is possible to configure ncurses to use other terminfo database formats.
183 A few are provided as examples in the include-directory (see --with-caps).
185 The ncurses program is designed specifically to test the ncurses library.
186 You can use it to verify that the screen highlights work correctly, that
187 cursor addressing and window scrolling works OK, etc.
189 5. Once you've tested, you can type `make install' to install libraries,
190 the programs, the terminfo database and the manual pages. Alternately, you
191 can type `make install' in each directory you want to install. In the
192 top-level directory, you can do a partial install using these commands:
194 'make install.progs' installs tic, infocmp, etc...
195 'make install.includes' installs the headers.
196 'make install.libs' installs the libraries (and the headers).
197 'make install.data' installs the terminfo data. (Note: `tic' must
198 be installed before the terminfo data can be
200 'make install.man' installs the manual pages.
202 ############################################################################
203 # CAVEAT EMPTOR: `install.data' run as root will NUKE any existing #
204 # terminfo database. If you have any custom or unusual entries SAVE them #
205 # before you install ncurses. I have a file called terminfo.custom for #
206 # this purpose. Don't forget to run tic on the file once you're done. #
207 ############################################################################
209 The terminfo(5) manual page must be preprocessed with tbl(1) before
210 being formatted by nroff(1). Modern man(1) implementations tend to do
211 this by default, but you may want to look at your version's manual page
212 to be sure. You may also install the manual pages after preprocessing
213 with tbl(1) by specifying the configure option --with-manpage-tbl.
215 If the system already has a curses library that you need to keep using
216 you'll need to distinguish between it and ncurses. See the discussion of
217 --disable-overwrite. If ncurses is installed outside the standard
218 directories (/usr/include and /usr/lib) then all your users will need to
219 use the -I option to compile programs and -L to link them.
221 If you have another curses installed in your system and you accidentally
222 compile using its curses.h you'll end up with a large number of
223 undefined symbols at link time.
225 IF YOU DO NOT HAVE ROOT: Change directory to the `progs' subdirectory
226 and run the `capconvert' script. This script will deduce various things
227 about your environment and use them to build you a private terminfo tree,
228 so you can use ncurses applications.
230 If more than one user at your site does this, the space for the duplicate
231 trees is wasted. Try to get your site administrators to install a system-
232 wide terminfo tree instead.
234 See the BSD CONVERSION NOTES section below for a few more details.
236 6. The c++ directory has C++ classes that are built on top of ncurses and
237 panels. You must have c++ (and its libraries) installed before you can
238 compile and run the demo.
240 Use --without-cxx-binding to tell configure to not build the C++ bindings
243 If you do not have C++, you must use the --without-cxx option to tell
244 the configure script to not attempt to determine the type of 'bool'
245 which may be supported by C++. IF YOU USE THIS OPTION, BE ADVISED THAT
246 YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++.
249 SUMMARY OF CONFIGURE OPTIONS:
250 ----------------------------
252 The configure script provides a short list of its options when you type
256 The --help and several options are common to all configure scripts that are
257 generated with autoconf. Those are all listed before the line
259 --enable and --with options recognized:
261 The other options are specific to this package. We list them in alphabetic
264 --disable-assumed-color
265 With ncurses 5.1, we introduced a new function, assume_default_colors()
266 which allows applications to specify what the default foreground and
267 background color are assumed to be. Most color applications use
268 full-screen color; but a few do not color the background. While the
269 assumed values can be overridden by invoking assume_default_colors(),
270 you may find it useful to set the assumed values to the pre-5.1
271 convention, using this configure option.
274 Assume machine has little memory. The configure script attempts to
275 determine if your machine has enough memory (about 6Mb) to compile the
276 terminfo database without writing portions to disk. Some allocators
277 return deceptive results, so you may have to override the configure
278 script. Or you may be building tic for a smaller machine.
281 Use only built-in data. The ncurses libraries normally read terminfo
282 and termcap data from disk. You can configure ncurses to have a
283 built-in database, aka "fallback" entries. Embedded applications may
284 have no need for an external database. Some, but not all of the
285 programs are useful in this configuration, e.g., reset and tput versus
289 Disable function-extensions. Configure ncurses without the functions
290 that are not specified by XSI. See ncurses/modules for the exact
291 list of library modules that would be suppressed.
294 Compile without hashmap scrolling-optimization code. This algorithm is
297 --disable-home-terminfo
298 The $HOME/.terminfo directory is normally added to ncurses' search
299 list for reading/writing terminfo entries, since that directory is
300 more likely writable than the system terminfo database. Use this
301 option to disable the feature altogether.
304 Disable compiler flags needed to use large-file interfaces.
307 For testing, compile-in code that frees memory that normally would not
308 be freed, to simplify analysis of memory-leaks.
311 The header files will ignore use of the _LP64 symbol to make chtype
312 and mmask_t types 32 bits (they may be long on 64-bit hosts, for
313 compatibility with older releases).
315 NOTE: this is potentially an ABI change, depending on existing
316 packages. The default for this option is "disabled" for ncurses
317 ABI 5, and "enabled" for ABI 6.
320 For testing, use functions rather than macros. The program will run
321 more slowly, but it is simpler to debug. This makes a header file
322 "nomacros.h". See also the --enable-expanded option.
325 If you are installing ncurses on a system which contains another
326 development version of curses, or which could be confused by the loader
327 for another version, we recommend that you leave out the link to
328 -lcurses. The ncurses library is always available as -lncurses.
329 Disabling overwrite also causes the ncurses header files to be
330 installed into a subdirectory, e.g., /usr/local/include/ncurses,
331 rather than the include directory. This makes it simpler to avoid
332 compile-time conflicts with other versions of curses.h
334 --disable-root-environ
335 Compile with environment restriction, so certain environment variables
336 are not available when running as root, or via a setuid/setgid
337 application. These are (for example $TERMINFO) those that allow the
338 search path for the terminfo or termcap entry to be customized.
340 --disable-scroll-hints
341 Compile without scroll-hints code. This option is ignored when
342 hashmap scrolling is configured, which is the default.
345 For testing, compile-in assertion code. This is used only for a few
346 places where ncurses cannot easily recover by returning an error code.
348 --enable-broken_linker
349 A few platforms have what we consider a broken linker: it cannot link
350 objects from an archive solely by referring to data objects in those
351 files, but requires a function reference. This configure option
352 changes several data references to functions to work around this
355 NOTE: With ncurses 5.1, this may not be necessary, since we are
356 told that some linkers interpret uninitialized global data as a
357 different type of reference which behaves as described above. We have
358 explicitly initialized all of the global data to work around the
362 Recognize BSD-style prefix padding. Some ancient BSD programs (such as
363 nethack) call tputs("50") to implement delays.
366 Compile with experimental $COLORFGBG code. That environment variable
367 is set by some terminal emulators as a hint to applications, by
368 advertising the default foreground and background colors. During
369 initialization, ncurses sets color pair 0 to match this.
372 The curses interface as documented in XSI is rather old, in fact
373 including features that precede ANSI C. The prototypes generally do
374 not make effective use of "const". When using stricter compilers (or
375 gcc with appropriate warnings), you may see warnings about the mismatch
376 between const and non-const data. We provide a configure option which
377 changes the interfaces to use const - quieting these warnings and
378 reflecting the actual use of the parameters more closely. The ncurses
379 library uses the symbol NCURSES_CONST for these instances of const,
380 and if you have asked for compiler warnings, will add gcc's const-qual
381 warning. There will still be warnings due to subtle inconsistencies
382 in the interface, but at a lower level.
384 NOTE: configuring ncurses with this option may detract from the
385 portability of your applications by encouraging you to use const in
386 places where the XSI curses interface would not allow them. Similar
387 issues arise when porting to SVr4 curses, which uses const in even
391 Use the option --disable-echo to make the build-log less verbose by
392 suppressing the display of the compile and link commands. This makes
393 it easier to see the compiler warnings. (You can always use "make -n"
394 to see the options that are used).
397 For testing, generate functions for certain macros to make them visible
398 as such to the debugger. See also the --disable-macros option.
401 Extend the cchar_t structure to allow more than 16 colors to be
402 encoded. This applies only to the wide-character (--enable-widec)
405 NOTE: using this option will make libraries which are not binary-
406 compatible with libncursesw 5.4. None of the interfaces change, but
407 applications which have an array of cchar_t's must be recompiled.
410 Modify the encoding of mouse state to make room for a 5th mouse button.
411 That allows one to use ncurses with a wheel mouse with xterm or
412 similar X terminal emulators.
414 NOTE: using this option will make libraries which are not binary-
415 compatible with libncursesw 5.4. None of the interfaces change, but
416 applications which have mouse mask mmask_t's must be recompiled.
419 Use the 4.4BSD getcap code if available, or a bundled version of it to
420 fetch termcap entries. Entries read in this way cannot use (make
421 cross-references to) the terminfo tree, but it is faster than reading
424 --enable-getcap-cache
425 Cache translated termcaps under the directory $HOME/.terminfo
427 NOTE: this sounds good - it makes ncurses run faster the second time.
428 But look where the data comes from - an /etc/termcap containing lots of
429 entries that are not up to date. If you configure with this option and
430 forget to install the terminfo database before running an ncurses
431 application, you will end up with a hidden terminfo database that
432 generally does not support color and will miss some function keys.
435 Compile-in cursor-optimization code that uses hard-tabs. We would make
436 this a standard feature except for the concern that the terminfo entry
437 may not be accurate, or that your stty settings have disabled the use
441 Compile-in support for the $NCURSES_NO_PADDING environment variable,
442 which allows you to suppress the effect of non-mandatory padding in
443 terminfo entries. This is the default, unless you have disabled the
447 Use rpath option when generating shared libraries, and with some
448 restrictions when linking the corresponding programs. This applies
449 mainly to systems using the GNU linker (read the manpage).
451 --enable-safe-sprintf
452 Compile with experimental safe-sprintf code. You may consider using
453 this if you are building ncurses for a system that has neither
454 vsnprintf() or vsprintf(). It is slow, however.
457 Compile support for ncurses' SIGWINCH handler. If your application has
458 its own SIGWINCH handler, ncurses will not use its own. The ncurses
459 handler causes wgetch() to return KEY_RESIZE when the screen-size
460 changes. This option is the default, unless you have disabled the
464 If your system supports symbolic links, make tic use symbolic links
465 rather than hard links to save diskspace when writing aliases in the
469 Compile-in support for user-definable terminal capabilities. Use the
470 -x option of tic and infocmp to treat unrecognized terminal
471 capabilities as user-defined strings. This option is the default,
472 unless you have disabled the extended functions.
475 Compile in support for reading terminal descriptions from termcap if no
476 match is found in the terminfo database. See also the --enable-getcap
477 and --enable-getcap-cache options.
480 Turn on GCC compiler warnings. There should be only a few.
483 Compile with wide-character code. This makes a different version of
484 the libraries (e.g., libncursesw.so), which stores characters as
487 NOTE: applications compiled with this configuration are not compatible
488 with those built for 8-bit characters. You cannot simply make a
489 symbolic link to equate libncurses.so with libncursesw.so
491 NOTE: the Ada95 binding may be built against either version of the the
492 ncurses library, but you must decide which: the binding installs the
493 same set of files for either version. Currently (2002/6/22) it does
494 not use the extended features from the wide-character code, so it is
495 probably better to not install the binding for that configuration.
498 Compile-in support experimental xmc (magic cookie) code.
500 --with-abi-version=NUM
501 Override the ABI version, which is used in shared library filenames.
502 Normally this is the same as the release version; some ports have
503 special requirements for compatibility.
505 --with-ada-compiler=CMD
506 Specify the Ada95 compiler command (default "gnatmake")
508 --with-ada-include=DIR
509 Tell where to install the Ada includes (default:
510 PREFIX/lib/ada/adainclude)
512 --with-ada-objects=DIR
513 Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib)
516 If --without-cxx is specified, override the type used for the "bool"
517 declared in curses.h (normally the type is automatically chosen to
518 correspond with that in <stdbool.h>, or defaults to platform-specific
522 If cross-compiling, specify a host C compiler, which is needed to
523 compile a few utilities which generate source modules for ncurses.
524 If you do not give this option, the configure script checks if the
525 $BUILD_CC variable is set, and otherwise defaults to gcc or cc.
527 --with-build-cflags=XXX
528 If cross-compiling, specify the host C compiler-flags. You might need
529 to do this if the target compiler has unusual flags which confuse the
532 --with-build-cppflags=XXX
533 If cross-compiling, specify the host C preprocessor-flags. You might
534 need to do this if the target compiler has unusual flags which confuse
537 --with-build-ldflags=XXX
538 If cross-compiling, specify the host linker-flags. You might need to
539 do this if the target linker has unusual flags which confuse the host
542 --with-build-libs=XXX
543 If cross-compiling, the host libraries. You might need to do this if
544 the target environment requires unusual libraries.
547 Specify an alternate terminfo capabilities file, which makes the
548 configure script look for "include/Caps.XXX". A few systems, e.g.,
549 AIX 4.x use the same overall file-format as ncurses for terminfo
550 data, but use different alignments within the tables to support
551 legacy applications. For those systems, you can configure ncurses
552 to use a terminfo database which is compatible with the native
556 Override type of chtype, which stores the video attributes and (if
557 --enable-widec is not given) a character. Prior to ncurses 5.5, this
558 was always unsigned long, but with ncurses 5.5, it may be unsigned.
559 Use this option if you need to preserve compatibility with 64-bit
563 Specify the terminfo source file to install. Usually you will wish
564 to install ncurses' default (misc/terminfo.src). Certain systems
565 have special requirements, e.g, OS/2 EMX has a customized terminfo
569 For testing, compile and link with Conor Cahill's dbmalloc library.
572 Generate debug-libraries (default). These are named by adding "_g"
573 to the root, e.g., libncurses_g.a
575 --with-default-terminfo-dir=XXX
576 Specify the default terminfo database directory. This is normally
577 DATADIR/terminfo, e.g., /usr/share/terminfo.
580 Enable experimental/development options. This does not count those
581 that change the interface, such as --enable-widec.
584 For testing, compile and link with Gray Watson's dmalloc library.
587 Specify a list of fallback terminal descriptions which will be
588 compiled into the ncurses library. See CONFIGURING FALLBACK ENTRIES.
591 use Alessandro Rubini's GPM library to provide mouse support on the
592 Linux console. Prior to ncurses 5.5, this introduced a dependency
593 on the GPM library. Currently ncurses uses the dlsym() function to
594 bind to the at runtime, so it is only necessary that the library be
595 present when ncurses is built.
597 --with-install-prefix=XXX
598 Allows you to specify an alternate location for installing ncurses
599 after building it. The value you specify is prepended to the "real"
600 install location. This simplifies making binary packages. The
601 makefile variable DESTDIR is set by this option. It is also possible
603 make install DESTDIR=XXX
604 since the makefiles pass that variable to subordinate makes.
606 NOTE: a few systems build shared libraries with fixed pathnames; this
607 option probably will not work for those configurations.
610 Generate libraries with libtool. If this option is selected, then it
611 overrides all other library model specifications. Note that libtool
612 must already be installed, uses makefile rules dependent on GNU make,
613 and does not promise to follow the version numbering convention of
614 other shared libraries on your system. However, if the --with-shared
615 option does not succeed, you may get better results with this option.
617 If a parameter value is given, it must be the full pathname of the
618 particular version of libtool, e.g.,
619 /usr/bin/libtool-1.2.3
621 It is possible to rebuild the configure script to use the automake
622 macros for libtool, e.g., AC_PROG_LIBTOOL. See the comments in
623 aclocal.m4 for CF_PROG_LIBTOOL, and ensure that you build configure
624 using the appropriate patch for autoconf from
625 http://invisible-island.net/autoconf/
627 --with-manpage-aliases
628 Tell the configure script you wish to create entries in the
629 man-directory for aliases to manpages which list them, e.g., the
630 functions in the panel manpage. This is the default. You can disable
631 it if your man program does this. You can also disable
632 --with-manpage-symlinks to install files containing a ".so" command
633 rather than symbolic links.
635 --with-manpage-format=XXX
636 Tell the configure script how you would like to install man-pages. The
637 option value must be one of these: gzip, compress, BSDI, normal,
638 formatted. If you do not give this option, the configure script
639 attempts to determine which is the case.
641 --with-manpage-renames=XXX
642 Tell the configure script that you wish to rename the manpages while
643 installing. Currently the only distribution which does this is
644 the Linux Debian. The option value specifies the name of a file
645 that lists the renamed files, e.g., $srcdir/man/man_db.renames
647 --with-manpage-symlinks
648 Tell the configure script that you wish to make symbolic links in the
649 man-directory for aliases to the man-pages. This is the default, but
650 can be disabled for systems that provide this automatically. Doing
651 this on systems that do not support symbolic links will result in
652 copying the man-page for each alias.
655 Tell the configure script that you with to preprocess the manpages
656 by running them through tbl to generate tables understandable by
660 Override type of mmask_t, which stores the mouse mask. Prior to
661 ncurses 5.5, this was always unsigned long, but with ncurses 5.5, it
662 may be unsigned. Use this option if you need to preserve compatibility
663 with 64-bit executables.
666 Override type of ospeed variable, which is part of the termcap
667 compatibility interface. In termcap, this is a 'short', which works
668 for a wide range of baudrates because ospeed is not the actual speed
669 but the encoded value, e.g., B9600 would be a small number such as 13.
670 However the encoding scheme originally allowed for values "only" up to
671 38400bd. A newer set of definitions past 38400bd is not encoded as
672 compactly, and is not guaranteed to fit into a short (see the function
673 cfgetospeed(), which returns a speed_t for this reason). In practice,
674 applications that required knowledge of the ospeed variable, i.e.,
675 those using termcap, do not use the higher speeds. Your application
676 (or system, in general) may or may not.
679 Generate normal (i.e., static) libraries (default).
682 Generate profile-libraries These are named by adding "_p" to the root,
686 Compile-in RCS identifiers. Most of the C files have an identifier.
688 --with-rel-version=NUM
689 Override the release version, which may be used in shared library
690 filenames. This consists of a major and minor version number separated
691 by ".". Normally the major version number is the same as the ABI
692 version; some ports have special requirements for compatibility.
695 Generate shared-libraries. The names given depend on the system for
696 which you are building, typically using a ".so" suffix, along with
697 symbolic links that refer to the release version.
699 NOTE: Unless you override the configure script by setting the $CFLAGS
700 environment variable, these will not be built with the -g debugging
703 NOTE: For some configurations, e.g., installing a new version of
704 ncurses shared libraries on a machine which already has ncurses
705 shared libraries, you may encounter problems with the linker.
706 For example, it may prevent you from running the build tree's
707 copy of tic (for installing the terminfo database) because it
708 loads the system's copy of the ncurses shared libraries. In that
709 case, using the misc/shlib script may be helpful, since it sets
710 $LD_LIBRARY_PATH to point to the build tree, e.g.,
711 ./misc/shlib make install
713 --with-shlib-version=XXX
714 Specify whether to use the release or ABI version for shared libraries.
715 This is normally chosen automatically based on the type of system
716 which you are building on. We use it for testing the configure script.
719 use FreeBSD sysmouse interface provide mouse support on the console.
721 --with-system-type=XXX
722 For testing, override the derived host system-type which is used to
723 decide things such as the linker commands used to build shared
724 libraries. This is normally chosen automatically based on the type of
725 system which you are building on. We use it for testing the configure
728 --with-terminfo-dirs=XXX
729 Specify a search-list of terminfo directories which will be compiled
730 into the ncurses library (default: DATADIR/terminfo)
733 When building the ncurses library, organize this as two parts: the
734 curses library (libncurses) and the low-level terminfo library
735 (libtinfo). This is done to accommodate applications that use only
736 the latter. The terminfo library is about half the size of the total.
738 If an option value is given, that overrides the name of the terminfo
739 library. For instance, if the wide-character version is built, the
740 terminfo library would be named libtinfow. But the libtinfow interface
741 is upward compatible from libtinfo, so it would be possible to overlay
742 libtinfo.so with a "wide" version of libtinfow.so by renaming it with
746 Specify a search-list of termcap files which will be compiled into the
747 ncurses library (default: /etc/termcap:/usr/share/misc/termcap)
750 Configure the trace() function as part of the all models of the ncurses
751 library. Normally it is part of the debug (libncurses_g) library only.
754 Suppress the configure script's check for Ada95, do not build the
755 Ada95 binding and related demo.
758 Don't install the ncurses header with the name "curses.h". Rather,
759 install as "ncurses.h" and modify the installed headers and manpages
763 XSI curses declares "bool" as part of the interface. C++ also declares
764 "bool". Neither specifies the size and type of booleans, but both
765 insist on the same name. We chose to accommodate this by making the
766 configure script check for the size and type (e.g., unsigned or signed)
767 that your C++ compiler uses for booleans. If you do not wish to use
768 ncurses with C++, use this option to tell the configure script to not
769 adjust ncurses bool to match C++.
771 --without-cxx-binding
772 Suppress the configure script's check for C++, do not build the
773 C++ binding and related demo.
776 Tell the configure script to suppress the build of ncurses' application
777 programs (e.g., tic). The test applications will still be built if you
778 type "make", though not if you simply do "make install".
781 Tell the configure script to use "xterm-old" for the entry used in
782 the terminfo database. This will work with variations such as
783 X11R5 and X11R6 xterm.
786 COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
787 --------------------------------------------
789 Because ncurses implements the X/Open Curses Specification, its interface
790 is fairly stable. That does not mean the interface does not change.
791 Changes are made to the documented interfaces when we find differences
792 between ncurses and X/Open or implementations which they certify (such as
793 Solaris). We add extensions to those interfaces to solve problems not
794 addressed by the original curses design, but those must not conflict with
795 the X/Open documentation.
797 Here are some of the major interface changes, and related problems which
798 you may encounter when building a system with different versions of
801 5.5 (October 10, 2005)
804 + terminfo installs "xterm-new" as "xterm" entry rather than
805 "xterm-old" (aka xterm-r6).
807 + terminfo data is installed using the tic -x option (few systems
808 still use ncurses 4.2).
810 + modify C++ binding to work with newer C++ compilers by providing
811 initializers and using modern casts. Old-style header names are
812 still used in this release to allow compiling with not-so-old
815 + form and menu libraries now work with wide-character data.
816 Applications which bypassed the form library and manipulated the
817 FIELD.buf data directly will not work properly with libformw, since
818 that no longer points to an array of char. The set_field_buffer()
819 and field_buffer() functions translate to/from the actual field
822 + change SP->_current_attr to a pointer, adjust ifdef's to ensure that
823 libtinfo.so and libtinfow.so have the same ABI. The reason for this
824 is that the corresponding data which belongs to the upper-level
825 ncurses library has a different size in each model.
827 + winnstr() now returns multibyte character strings for the
828 wide-character configuration.
830 + assume_default_colors() no longer requires that use_default_colors()
833 + data_ahead() now works with wide-characters.
835 + slk_set() and slk_wset() now accept and store multibyte or
836 multicolumn characters.
838 + start_color() now returns OK if colors have already been started.
839 start_color() also returns ERR if it cannot allocate memory.
841 + pair_content() now returns -1 for consistency with init_pair() if it
842 corresponds to the default-color.
844 + unctrl() now returns null if its parameter does not correspond
848 Experimental mouse version 2 supports wheel mice with buttons
849 4 and 5. This requires ABI 6 because it modifies the encoding
852 Experimental extended colors allows encoding of 256 foreground
853 and background colors, e.g., with the xterm-256color or
854 xterm-88color terminfo entries. This requires ABI 6 because
855 it changes the size of cchar_t.
857 Added internal functions:
861 _nc_retrace_cvoid_ptr
865 Removed internal functions:
868 Modified internal functions:
873 5.4 (February 8, 2004)
876 + add the remaining functions for X/Open curses wide-character support.
877 These are only available if the library is configured using the
878 --enable-widec option.
882 + write getyx() and related 2-return macros in terms of getcury(),
885 + simplify ifdef for bool declaration in curses.h
887 + modify ifdef's in curses.h that disabled use of __attribute__() for
888 g++, since recent versions implement the cases which ncurses uses.
890 + change some interfaces to use const:
902 Added internal functions:
905 _nc_is_charable() wide
906 _nc_locale_breaks_acs()
909 _nc_to_widechar() wide
911 _nc_trace_bufcat() debug
914 Removed internal functions:
918 Modified internal functions:
922 5.3 (October 12, 2002)
925 + change type for bool used in headers to NCURSES_BOOL, which usually
926 is the same as the compiler's definition for 'bool'.
928 + add all but two functions for X/Open curses wide-character support.
929 These are only available if the library is configured using the
930 --enable-widec option. Missing functions are
934 + add environment variable $NCURSES_ASSUMED_COLORS to modify the
935 assume_default_colors() extension.
941 Added internal functions:
942 _nc_altcharset_name() debug
944 _nc_retrace_bool() debug
945 _nc_retrace_unsigned() debug
947 _nc_trace_ttymode() debug
952 Removed internal functions:
955 Modified internal functions:
958 5.2 (October 21, 2000)
961 + revert termcap ospeed variable to 'short' (see discussion of the
962 --with-ospeed configure option).
967 + made the extended terminal capabilities
968 (configure --enable-tcap-names) a standard feature. This should
969 be transparent to applications that do not require it.
971 + removed the trace() function and related trace support from the
974 + modified curses.h.in, undef'ing some symbols to avoid conflict
977 Added extensions: assume_default_colors().
979 5.0 (October 23, 1999)
982 + implemented the wcolor_set() and slk_color() functions.
984 + move macro winch to a function, to hide details of struct ldat
986 + corrected prototypes for slk_* functions, using chtype rather than
989 + the slk_attr_{set,off,on} functions need an additional void*
990 parameter according to XSI.
992 + modified several prototypes to correspond with 1997 version of X/Open
993 Curses: [w]attr_get(), [w]attr_set(), border_set() have different
994 parameters. Some functions were renamed or misspelled:
995 erase_wchar(), in_wchntr(), mvin_wchntr(). Some developers have used
998 Added extensions: keybound(), curses_version().
1000 Terminfo database changes:
1002 + change translation for termcap 'rs' to terminfo 'rs2', which is
1003 the documented equivalent, rather than 'rs1'.
1005 The problems are subtler in recent releases.
1007 a) This release provides users with the ability to define their own
1008 terminal capability extensions, like termcap. To accomplish this,
1009 we redesigned the TERMTYPE struct (in term.h). Very few
1010 applications use this struct. They must be recompiled to work with
1013 a) If you use the extended terminfo names (i.e., you used configure
1014 --enable-tcap-names), the resulting terminfo database can have some
1015 entries which are not readable by older versions of ncurses. This
1016 is a bug in the older versions:
1018 + the terminfo database stores booleans, numbers and strings in
1019 arrays. The capabilities that are listed in the arrays are
1020 specified by X/Open. ncurses recognizes a number of obsolete and
1021 extended names which are stored past the end of the specified
1024 + a change to read_entry.c in 951001 made the library do an lseek()
1025 call incorrectly skipping data which is already read from the
1026 string array. This happens when the number of strings in the
1027 terminfo data file is greater than STRCOUNT, the number of
1028 specified and obsolete or extended strings.
1030 + as part of alignment with the X/Open final specification, in the
1031 990109 patch we added two new terminfo capabilities:
1032 set_a_attributes and set_pglen_inch). This makes the indices for
1033 the obsolete and extended capabilities shift up by 2.
1035 + the last two capabilities in the obsolete/extended list are memu
1036 and meml, which are found in most terminfo descriptions for xterm.
1038 When trying to read this terminfo entry, the spurious lseek()
1039 causes the library to attempt to read the final portion of the
1040 terminfo data (the text of the string capabilities) 4 characters
1041 past its starting point, and reads 4 characters too few. The
1042 library rejects the data, and applications are unable to
1043 initialize that terminal type.
1045 FIX: remove memu and meml from the xterm description. They are
1046 obsolete, not used by ncurses. (It appears that the feature was
1047 added to xterm to make it more like hpterm).
1049 This is not a problem if you do not use the -x option of tic to
1050 create a terminfo database with extended names. Note that the
1051 user-defined terminal capabilities are not affected by this bug,
1052 since they are stored in a table after the older terminfo data ends,
1053 and are invisible to the older libraries.
1055 c) Some developers did not wish to use the C++ binding, and used the
1056 configure --without-cxx option. This causes problems if someone
1057 uses the ncurses library from C++ because that configure test
1058 determines the type for C++'s bool and makes ncurses match it, since
1059 both C++ and curses are specified to declare bool. Calling ncurses
1060 functions with the incorrect type for bool will cause execution
1061 errors. In 5.0 we added a configure option "--without-cxx-binding"
1062 which controls whether the binding itself is built and installed.
1067 + correct prototype for termattrs() as per XPG4 version 2.
1069 + add placeholder prototypes for color_set(), erasewchar(),
1070 term_attrs(), wcolor_set() as per XPG4 version 2.
1072 + add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
1075 New extensions: keyok() and define_key().
1077 Terminfo database changes:
1079 + corrected definition in curses.h for ACS_LANTERN, which was 'I'
1084 We added these extensions: use_default_colors(). Also added
1085 configure option --enable-const, to support the use of const where
1086 X/Open should have, but did not, specify.
1088 The terminfo database content changed the representation of color for
1089 most entries that use ANSI colors. SVr4 curses treats the setaf/setab
1090 and setf/setb capabilities differently, interchanging the red/blue
1091 colors in the latter.
1093 4.0 (December 24, 1996)
1095 We bumped to version 4.0 because the newly released dynamic loader
1096 (ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL
1097 versions were inconsistent. At that point, ncurses ABI was 3.4 and the
1098 REL was 1.9.9g, so we made them consistent.
1100 1.9.9g (December 1, 1996)
1102 This fixed most of the problems with 1.9.9e, and made these interface
1105 + remove tparam(), which had been provided for compatibility with
1106 some termcap. tparm() is standard, and does not conflict with
1107 application's fallback for missing tparam().
1109 + turn off hardware echo in initscr(). This changes the sense of the
1110 echo() function, which was initialized to echoing rather than
1111 nonechoing (the latter is specified). There were several other
1112 corrections to the terminal I/O settings which cause applications to
1115 + implemented several functions (such as attr_on()) which were
1116 available only as macros.
1118 + corrected several typos in curses.h.in (i.e., the mvXXXX macros).
1120 + corrected prototypes for delay_output(),
1121 has_color, immedok() and idcok().
1123 + corrected misspelled getbkgd(). Some applications used the
1126 + added _yoffset to WINDOW. The size of WINDOW does not impact
1127 applications, since they use only pointers to WINDOW structs.
1129 These changes were made to the terminfo database:
1131 + removed boolean 'getm' which was available as an extended name.
1133 We added these extensions: wresize(), resizeterm(), has_key() and
1136 1.9.9e (March 24, 1996)
1138 not recommended (a last-minute/untested change left the forms and
1139 menus libraries unusable since they do not repaint the screen).
1140 Foreground/background colors are combined incorrectly, working properly
1141 only on a black background. When this was released, the X/Open
1142 specification was available only in draft form.
1144 Some applications (such as lxdialog) were "fixed" to work with the
1145 incorrect color scheme.
1148 IF YOU ARE A SYSTEM INTEGRATOR:
1149 ------------------------------
1151 Configuration and Installation:
1153 On platforms where ncurses is assumed to be installed in /usr/lib,
1154 the configure script uses "/usr" as a default:
1156 Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
1158 For other platforms, the default is "/usr/local". See the discussion
1159 of the "--disable-overwrite" option.
1161 The location of the terminfo is set indirectly by the "--datadir"
1162 configure option, e.g., /usr/share/terminfo, given a datadir of
1163 /usr/share. You may want to override this if you are installing
1164 ncurses libraries in nonstandard locations, but wish to share the
1167 Normally the ncurses library is configured in a pure-terminfo mode;
1168 that is, with the --disable-termcap option. This makes the ncurses
1169 library smaller and faster. The ncurses library includes a termcap
1170 emulation that queries the terminfo database, so even applications that
1171 use raw termcap to query terminal characteristics will win (providing
1172 you recompile and relink them!).
1174 If you must configure with termcap fallback enabled, you may also wish
1175 to use the --enable-getcap option. This speeds up termcap-based
1176 startups, at the expense of not allowing personal termcap entries to
1177 reference the terminfo tree. See comments in
1178 ncurses/tinfo/read_termcap.c for further details.
1180 Note that if you have $TERMCAP set, ncurses will use that value
1181 to locate termcap data. In particular, running from xterm will
1182 set $TERMCAP to the contents of the xterm's termcap entry.
1183 If ncurses sees that, it will not examine /etc/termcap.
1187 The terminfo file assumes that Shift-Tab generates \E[Z (the ECMA-48
1188 reverse-tabulation sequence) rather than ^I. Here are the loadkeys -d
1189 mappings that will set this up:
1191 keycode 15 = Tab Tab
1192 alt keycode 15 = Meta_Tab
1193 shift keycode 15 = F26
1194 string F26 ="\033[Z"
1196 Naming the Console Terminal
1198 In various systems there has been a practice of designating the system
1199 console driver type as `console'. Please do not do this! It
1200 complicates peoples' lives, because it can mean that several different
1201 terminfo entries from different operating systems all logically want to
1202 be called `console'.
1204 Please pick a name unique to your console driver and set that up
1205 in the /etc/inittab table or local equivalent. Send the entry to the
1206 terminfo maintainer (listed in the misc/terminfo file) to be included
1207 in the terminfo file, if it's not already there. See the
1208 term(7) manual page included with this distribution for more on
1209 conventions for choosing type names.
1211 Here are some recommended primary console names:
1213 linux -- Linux console driver
1218 If you are responsible for integrating ncurses for one of these
1219 distribution, please either use the recommended name or get back
1220 to us explaining why you don't want to, so we can work out nomenclature
1221 that will make users' lives easier rather than harder.
1224 RECENT XTERM VERSIONS:
1225 ---------------------
1227 The terminfo database file included with this distribution assumes you
1228 are running a modern xterm based on XFree86 (i.e., xterm-new). The
1229 earlier X11R6 entry (xterm-r6) and X11R5 entry (xterm-r5) is provided
1230 as well. See the --without-xterm-new configure script option if you
1231 are unable to update your system.
1234 CONFIGURING FALLBACK ENTRIES:
1235 ----------------------------
1237 In order to support operation of ncurses programs before the terminfo
1238 tree is accessible (that is, in single-user mode or at OS installation
1239 time) the ncurses library can be compiled to include an array of
1240 pre-fetched fallback entries. This must be done on a machine which
1241 has ncurses' infocmp and terminfo database installed.
1243 These entries are checked by setupterm() only when the conventional
1244 fetches from the terminfo tree and the termcap fallback (if configured)
1245 have been tried and failed. Thus, the presence of a fallback will not
1246 shadow modifications to the on-disk entry for the same type, when that
1247 entry is accessible.
1249 By default, there are no entries on the fallback list. After you have
1250 built the ncurses suite for the first time, you can change the list
1251 (the process needs infocmp(1)). To do so, use the script
1252 ncurses/tinfo/MKfallback.sh. A configure script option
1253 --with-fallbacks does this (it accepts a comma-separated list of the
1254 names you wish, and does not require a rebuild).
1256 If you wanted (say) to have linux, vt100, and xterm fallbacks, you
1257 would use the commands
1260 tinfo/MKfallback.sh linux vt100 xterm >fallback.c
1262 Then just rebuild and reinstall the library as you would normally.
1263 You can restore the default empty fallback list with
1265 tinfo/MKfallback.sh >fallback.c
1267 The overhead for an empty fallback list is one trivial stub function.
1268 Any non-empty fallback list is const-ed and therefore lives in sharable
1269 text space. You can look at the comment trailing each initializer in
1270 the generated ncurses/fallback.c file to see the core cost of the
1271 fallbacks. A good rule of thumb for modern vt100-like entries is that
1272 each one will cost about 2.5K of text space.
1275 BSD CONVERSION NOTES:
1276 --------------------
1278 If you need to support really ancient BSD programs, you probably
1279 want to configure with the --enable-bsdpad option. What this does
1280 is enable code in tputs() that recognizes a numeric prefix on a
1281 capability as a request for that much trailing padding in milliseconds.
1282 There are old BSD programs that do things like tputs("50").
1284 (If you are distributing ncurses as a support-library component of
1285 an application you probably want to put the remainder of this section
1286 in the package README file.)
1288 The following note applies only if you have configured ncurses with
1291 ------------------------------- CUT HERE --------------------------------
1293 If you are installing this application privately (either because you
1294 have no root access or want to experiment with it before doing a root
1295 installation), there are a couple of details you need to be aware of.
1296 They have to do with the ncurses library, which uses terminfo rather
1297 than termcap for describing terminal characteristics.
1299 Though the ncurses library is terminfo-based, it will interpret your
1300 TERMCAP variable (if present), any local termcap files you reference
1301 through it, and the system termcap file. However, in order to avoid
1302 slowing down your application startup, it will only do this once per
1305 The first time you load a given terminal type from your termcap
1306 database, the library initialization code will automatically write it
1307 in terminfo format to a subdirectory under $HOME/.terminfo. After
1308 that, the initialization code will find it there and do a (much
1309 faster) terminfo fetch.
1311 Usually, all this means is that your home directory will silently grow
1312 an invisible .terminfo subdirectory which will get filled in with
1313 terminfo descriptions of terminal types as you invoke them. If anyone
1314 ever installs a global terminfo tree on your system, this will quietly
1315 stop happening and your $HOME/.terminfo will become redundant.
1317 The objective of all this logic is to make converting from BSD termcap
1318 as painless as possible without slowing down your application (termcap
1319 compilation is expensive).
1321 If you don't have a TERMCAP variable or custom personal termcap file,
1322 you can skip the rest of this dissertation.
1324 If you *do* have a TERMCAP variable and/or a custom personal termcap file
1325 that defines a terminal type, that definition will stop being visible
1326 to this application after the first time you run it, because it will
1327 instead see the terminfo entry that it wrote to $HOME/terminfo the
1330 Subsequently, editing the TERMCAP variable or personal TERMCAP file
1331 will have no effect unless you explicitly remove the terminfo entry
1332 under $HOME/terminfo. If you do that, the entry will be recompiled
1333 from your termcap resources the next time it is invoked.
1335 To avoid these complications, use infocmp(1) and tic(1) to edit the
1336 terminfo directory directly.
1338 ------------------------------- CUT HERE --------------------------------
1340 USING NCURSES WITH AFS:
1341 AFS treats each directory as a separate logical filesystem, you
1342 can't hard-link across them. The --enable-symlinks option copes
1343 with this by making tic use symbolic links.
1345 USING NCURSES WITH GPM:
1346 Ncurses 4.1 and up can be configured to use GPM (General Purpose
1347 Mouse) which is used on Linux console. Be aware that GPM is commonly
1348 installed as a shared library which contains a wrapper for the curses
1349 wgetch() function (libcurses.o). Some integrators have simplified
1350 linking applications by combining all or part of libcurses.so into the
1351 libgpm.so file, producing symbol conflicts with ncurses (specifically
1352 the wgetch function). This was originally the BSD curses, but
1353 generally whatever curses library exists on the system.
1355 You may be able to work around this problem by linking as follows:
1357 cc -o foo foo.o -lncurses -lgpm -lncurses
1359 but the linker may not cooperate, producing mysterious errors.
1360 See the FAQ, as well as the discussion under the --with-gpm option:
1362 http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
1364 BUILDING NCURSES WITH A CROSS-COMPILER
1365 Ncurses can be built with a cross-compiler. Some parts must be built
1366 with the host's compiler since they are used for building programs
1367 (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
1368 that are compiled into the ncurses library. The essential thing to do
1369 is set the BUILD_CC environment variable to your host's compiler, and
1370 run the configure script configuring for the cross-compiler.
1372 The configure options --with-build-cc, etc., are provided to make this
1373 simpler. Since make_hash and make_keys use only ANSI C features, it
1374 is normally not necessary to provide the other options such as
1375 --with-build-libs, but they are provided for completeness.
1377 Note that all of the generated source-files which are part of ncurses
1378 will be made if you use
1382 This would be useful in porting to an environment which has little
1383 support for the tools used to generate the sources, e.g., sed, awk and
1386 When ncurses has been successfully cross-compiled, you may want to use
1387 "make install" (with a suitable target directory) to construct an
1388 install tree. Note that in this case (as with the --with-fallbacks
1389 option), ncurses uses the development platform's tic to do the
1390 "make install.data" portion.
1393 Send any feedback to the ncurses mailing list at
1394 bug-ncurses@gnu.org. To subscribe send mail to
1395 bug-ncurses-request@gnu.org with body that reads:
1396 subscribe ncurses <your-email-address-here>
1398 The Hacker's Guide in the doc directory includes some guidelines
1399 on how to report bugs in ways that will get them fixed most quickly.