Plan 9 from Bell Labs’s /usr/web/sources/contrib/fgb/root/sys/src/ape/lib/curses/INSTALL

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


How to build PDCurses
=====================

Unpack the source archive, then go to the appropriate section below, for 
native console, X11 or SDL.


DOS, OS/2, or Windows console
-----------------------------

. In the subdirectory for each OS, you'll find a number of ".mak"
  files, one for each supported compiler:

  DOS:
	bccdos.mak	- Borland C++ 3.0+
	gccdos.mak	- DJGPP V2
	mscdos.mak	- Microsoft C
	wccdos16.mak	- Watcom 10.6+ (16-bit)
	wccdos4g.mak	- Watcom 10.6+ (32-bit)

  OS/2:
	bccos2.mak	- Borland C++ 2.0
	gccos2.mak	- EMX 0.9b+
	iccos2.mak	- C Set/2
	wccos2.mak	- Watcom 10.6+ (32-bit)

  Windows:
	bccwin32.mak	- Borland C++ 4.0.2+
	dmcwin32.mak	- Digital Mars
	gccwin32.mak	- Cygnus GNU Compiler
	lccwin32.mak	- LCC-Win32
	mingwin32.mak	- MinGW
	vcwin32.mak	- Microsoft Visual C++ 2.0+
	wccwin32.mak	- Watcom 10.6+

. For 16-bit compilers, you can change the memory MODEL in the makefile.
  (Large model is the default, and recommended.)

. Optionally, you can build in a different directory than the platform
  directory by setting PDCURSES_SRCDIR to point to the directory where
  you unpacked PDCurses, and changing to your target directory:

	set PDCURSES_SRCDIR=c:\pdcurses

  This step is no longer required when building in the platform
  directory, and won't work with the LCC or Digital Mars makefiles.

. Build it:

	make -f makefilename

  (For Watcom, use "wmake" instead of "make"; for MSVC or C Set/2,
  "nmake".) You'll get the libraries (pdcurses.lib or .a, depending on
  your compiler; and panel.lib or .a), the demos (*.exe), and a lot of
  object files. Note that the panel library is now (as of 3.2) just a
  copy of the main library, provided for convenience; both panel and
  curses functions are in the main library.

  For Windows (except with LCC or Digital Mars), you can also give the
  optional parameter "WIDE=Y", to build the library with wide-character
  (Unicode) support:

	make -f mingwin32.mak WIDE=Y

  When built this way, the library is not compatible with Windows 9x,
  unless you also link with the Microsoft Layer for Unicode (not
  tested).

  Another option for Windows, "UTF8=Y", makes PDCurses ignore the
  system locale, and treat all narrow-character strings as UTF-8. This
  option has no effect unless WIDE=Y is also set. Use it to get around
  the poor support for UTF-8 in the Win32 console:

	make -f mingwin32.mak WIDE=Y UTF8=Y

  You can also use the optional parameter "DLL=Y" with Visual C++,
  MinGW, Cygwin or EMX, to build the library as a DLL:

	nmake -f vcwin32.mak WIDE=Y DLL=Y

  When you build the library as a Windows DLL, you must always define
  PDCURSES_DLL_BUILD when linking against it. (Or, if you only want to
  use the DLL, you could add this definition to your curses.h.) This is
  not true for OS/2.


X11
---

. Run "./configure" in the PDCurses-x.x directory.

  To build the wide-character version of the library, specify
  "--enable-widec" as a parameter. To use X Input Methods, add
  "--enable-xim". I recommend these options, but I haven't yet made
  them the defaults, for the sake of backwards compatibility and due to
  their new and relatively untested status.

  If your system is lacking in UTF-8 support, you can force the use of
  UTF-8 instead of the system locale via "--enable-force-utf8". This is
  generally more useful in Windows.

  If configure can't find your X include files or X libraries, you can
  specify the paths with the arguments "--x-includes=inc_path" and/or
  "--x-libraries=lib_path".

  By default, the library and demo programs are built with the optimizer
  switch -O2. You can turn this off, and turn on debugging (-g), by
  adding "--with-debug" to the configure command.

. Run "make". This should build libXCurses and all the demo programs.

. Optionally, run "make install". curses.h and panel.h will be renamed
  when installed (to xcurses.h and xpanel.h), to avoid conflicts with
  any existing curses installations. Unrenamed copies of curses.h and
  panel.h are installed in (by default) /usr/local/include/xcurses.

  As of 3.2, libXpanel is just a symlink to libXCurses. Both curses and
  panel functions are in the main library.


SDL
---

. On *nix (including Linux and Mac OS X), run "make" in the sdl1
  directory. There is no configure script (yet?) for this port. This
  assumes a working sdl-config, and GNU make. It builds the library 
  libpdcurses.a (dynamic lib not implemented).

  With MinGW, run "make -f Makefile.mng". This assumes SDL is installed
  in the standard directories. The MinGW makefile accepts the optional
  parameters "DLL=Y" and "DEBUG=Y", as with the console version. (Wide-
  character support is not yet implemented for SDL.) Both makefiles
  recognize the optional PDCURSES_SRCDIR environment variable, as with
  the console ports. Makefile.mng builds libpdcurses.a, along with 
  pdcurses.dll, if specified.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].