This package requires at least perl5.005. You're on your own before
then.
1) Make sure you've got the prerequisites
1.1) Make sure perl has been built.
1.2) Make sure you have a Curses C library installed. Either original
BSD Curses or newer Ncurses will do. Pdcurses (public domain Curses
code that works in DOS, Windows, and X11) almost works. See
PDCURSES section below.
2) Chdir into the Curses source directory (which you unpacked from the
.tgz file you downloaded from CPAN)
3) Want to see if maybe the package can autoconfigure itself? It's
pretty dumb about it, but give it a try and skip to (5).
4) Configure the build for your system.
4.1)
Look in the "hints" directory to see if any of the hint files are
appropriate to your machine's OS. If so, symlink or copy it to the
file "c-config.h" in the current ("Curses") directory. If not,
copy "hints/c-none.h" to "c-config.h" in the current directory.
Then edit "c-config.h" and follow the directions. If you have to
"roll your own", be sure and save a copy. A "make clean" will
delete "c-config.h". If you "rolled your own", please send me a
copy so I can include it in future distributions (see
"hints/c-isc.h" for an example of a user-contributed "c-config.h").
4.2)
Curses has an interface header file named form.h. If on your system
this is in a system header file directory such as /usr/include, you
have a problem. That's because Perl also has a file named form.h
in a directory that is searched before the system directories in the
compile of the Perl Curses module.
So you'll have to fix that. It's better to have your Curses stuff
in its own directory. /usr/include/ncurses is conventional. Move
all your Curses header files (curses.h, ncurses.h, form.h, menu.h,
panel.h) into this directory. If you use /usr/include/ncurses,
Makefile.PL will find them there. Otherwise, set the _CFLAGS
environment variables below accordingly.
Alternatively, you can just edit c-config.h, after running
Makefile.PL. Replace the line
#include
with something like
#include "/usr/include/form.h"
explicitly specifying the Ncurses version of form.h.
You can ignore all this if you're not building forms capability
into the Perl Curses module (by specifying "FORMS" as an option to
Makefile.PL below).
4.3)
Set environment variables telling the compiler and linker where your
Curses C libraries are:
CURSES_CFLAGS: -I and -D options needed at compile time for access to
the basic Curses library (libcurses).
CURSES_LDFLAGS: -L and -l options needed at link time for access to
the basic Curses library (libcurses). (this really
must be only -L and -l options; Makefile.PL parses it. Furthermore,
there can't be any space between the -L or -l and its value).
CURSES_PANEL_CFLAGS
CURSES_PANEL_LDFLAGS
CURSES_MENU_CFLAGS
CURSES_MENU_LDFLAGS
CURSES_FORM_CFLAGS
CURSES_FORM_LDFLAGS
These are analogous, but for the panel, menu, and form specialty
Curses libraries, respectively.
You can set these in your shell and export them, e.g.
export CURSES_CFLAGS="-I/usr/include/ncurses"
export CURSES_LDFLAGS="-L/usr/lib/ncurses -lncurses"
Or you can set them right on the 'perl Makefile.PL' command.
5) perl Makefile.PL [PANELS] [MENUS] [FORMS] [options]
PANELS means to include Curses panel function.
MENUS means to include Curses menu functions.
FORMS means to include Curses form function.
For PANELS, MENUS, and FORMS, you must have the associated C library on
your system (libpanel, libmenu, libform). Choosing one of these options
without having the library will prevent this package from compiling.
Currently, PANELS, MENUS, and FORMS don't work for the BSD
hints files (c-*.bsd.h), because I'm not aware of any panel, menu,
or form libraries for BSD curses.
This package needs the perl header files. If you've already
installed perl, the "Makefile.PL" will magically know where they
are. If you haven't installed perl, you may need to tell the
"Makefile.PL" where the header files are. You can do this with the
"PERL_SRC=