  0. Notice
  
  This program needs some libraries to run. Don't worry you don't have to
download something else. I included the library in this archive because the
libraries you need were written by me and you can't find them elsewhere.

  So you have to build and install them first.
  The operation are the same for every program or library. You have to build
and install them in the correct order and all should work. I tested them on
my Linux box, but them should work on other OSes too. If you have some problem
please let me know.
  
  1. What you have to do
  
  To compile the program you have to build and install the following
directories in order:
	- work
	- terminal
	- libterm
	- cdplayer

  The first three directory contains three shared libraries. Each library need
the previous one so you won't be able to make them in a different order. For
instructions about how to build and install them see next chapters.

  2. Building

  To build each directory go in that directory and type

	# make

  This should build the library or executable contained in the directory.
  If some error occure during compiling please let me know and I will try to
correct them. I tried to compile them only at home on my Linux box, so there
could be many inconvenient I never saw.
  After building remember to install the libraries. If you do not do so, you
won't be able to build the next directories.

  3. Install

  To install each directory go in that directory and type

	# make install

  This will install the files in the predefined directories. Them are:

	~/bin		for binaries
	~/man		for man pages
	~/lib		for libraries
	~/include	for include files

  To override this behaviour you can set the PREFIX environmental variable.
  If this variable is set (and exported!) then files are installed as follows:

	$PREFIX/bin	for binaries
	$PREFIX/man	for man pages
	$PREFIX/lib	for libraries
	$PREFIX/include	for include files

  If you want to share the cdplayer with other users (and you can be root), a
good choice for PREFIX is /usr/local. This can be down with:

	# export PREFIX="/usr/local"	(with sh/bash shells)

	# setenv PREFIX /usr/local	(with csh/tcsh shells)

  If you are root you can also choose to which user and group the files will
belong setting the enviromental variables OWNER and GROUP. For example:

	# export OWNER="bin"
	# export GROUP="wheel"		(with sh/bash shells)

	# setenv OWNER bin
	# setenv GROUP wheel		(with csh/tcsh shells)

  When installing a library a backup copy of the previous one, if exist, is
done in a directory called backup/ in the library directory. If you do not
want library backup you can set the enviromental variable NOBACKUP to any
value. For example:

	# export NOBACKUP="nobackup"	(with sh/bash shells)

	# setenv NOBACKUP nobackup	(with csh/tcsh shells)

  If you want to install some directory with some options and other with
different values you have to set them again or to unset them to return to
default behavior. To unset a variable use:

	# unset PREFIX			(with sh/bash shells)

	# unsetenv PREFIX		(with csh/tcsh shells)

  If you install a library to a directory you have to inform ld.so (the dynamic
loader) where to find it. This is automatic for the directories listed in the
file /etc/ld.so.conf and in the default library paths /lib and /usr/lib, but
you can give a set of other directories where to find libraries, setting the
environmental variable LD_LIBRARY_PATH to a colon separated list of
directories. For example:
	
	# export LD_LIBRARY_PATH="$HOME/lib:/usr/shared/lib"
					(with sh/bash shells)

	# setenv LD_LIBRARY_PATH $HOME/lib:/usr/shared/lib
					(with csh/tcsh shells)

  Also the linker after compiling should find your library. You can the
directory where your libraries are setting the environmental variable
LIBRARY_PATH to a colon separated list of directories. For example:

	# export LIBRARY_PATH="$HOME/lib"
					(with sh/bash shells)
	
	# setenv LIBRARY_PATH $HOME/lib
					(with csh/tcsh shells)

  When you install a library you also install include files. Include files
should be found by the compiler. If you do not install include files in a
default directory for include (/usr/include and /usr/local/include) you have
to say the compiler where to find them. You can do it setting the environmental
variable C_INCLUDE_PATH to a colon separated list of directories. For example:

	# export C_INCLUDE_PATH="$HOME/include"
					(with sh/bash shells)
	
	# setenv C_INCLUDE_PATH $HOME/include
					(with csh/tcsh shells)

  If you install a program to a directory with is not in your PATH enviromental
variable you have to add that directory. For example

	# PATH="$PATH:$HOME/bin"	(with sh/bash shells)

	# setenv PATH ${PATH}:$HOME/bin	(with csh/tcsh shells)

  To make man pages available you mush install them in a default directory (as
setted in /etc/man.config, usually /usr/man, /usr/local/man, /usr/X11R6/man).
If you install them in a different one you have to set the environmental
variable MANPATH with a comma separated list of directories that contains
your directory. For example:
	
	# export MANPATH="$HOME/man"	(with sh/bash shells)

	# setenv MANPATH $HOME/man	(with csh/tcsh shells)

  A problem I had on some machines is that as a normal user I hadn't write
access on the device /dev/null used to throw away not useful output. If you
set an environmental variable named TRASH this file (or device) will be used
for that. For example:

	# export TRASH="$HOME/trash"	(with sh/bash shells)

	# setenv TRASH $HOME/trash	(with csh/tcsh shells)

  The same behavior of some environmental variable can be achieved using some
command line options. I prefer environmental variable because them do not force
you to modify makefiles or your normal behavior in calling programs.

  That's all. It seems difficult but it isn't.
  If you have problems, e-mail me and I will help you.

								Flavio Lerda
