REQUIRED and RECOMMENDED
To use the application, you need:
- Required
-
- a CD-ROM device capable of playing audio and supported by the system (device itself is nothing without an appropriate driver).
- For text mode: libncurses 1.9.9e+ (5.0 recommended)
- For X mode: libxforms 0.81+ (0.88 recommended)
- Optional
-
- Audio-card supported by the system
- libgpm for mouse support in console mode (version 1.14 or later is recommended).
- Recommended
-
- proc support
Since both libncurses and libgpm have become a Linux standard features and come with every popular Linux distribution, you most probably have those installed. Check for 'libncurses' and 'libgpm' in /lib and /usr/lib directories. The libraries are available from the following FTP sites:
libncurses 5: ftp ftp.gnu.org /pub/gnu metalab.unc.edu /pub/gnu/ncurses libgpm: metalab.unc.edu /pub/Linux/system/mouse
libxforms:
N.B. Some Linux distributions still come with "classic" libcurses version 1.9.9g or earlier, referred sometimes as libcurses 3. This version can be used as well, however is has a bug with colour support. SADP tests libncurses version and accomodates to this bug, however version 4 is preferred. Unfortunately, ncurses library does not provide a way to get version during run time, therefore if you upgrade libncurses, SADP has to be recompiled in order to get advantage of the new version.
FTP location for libcurses 1.9.9g:
ftp ftp.netcom.com /pub/zm/zmbenhal/ncurses
To compile the application, you need:
- gcc (version 2.7.2 or later is recommended)
- GNU make (version 3.74 or later is recommended)
INSTALLATION INSTRUCTION
To install:
- Set shell variables if needed (see CONFIGURATION section later in the file).
- Type 'make wipe' (no need for the first time).
- Type 'configure' to create make file. Optional arguments with configure are considered in CONFIGURATION section.
If (and only if) you have troubles with configuration script,
just link file 'makefile.linux' to 'makefile' and edit it if
needed.
- Configure the program by editing sadp_config.h
(See CONFIGURATION section)
SCSI CD users of the CONSOLE sadp version with Linux Kernel 2.1.x
or 2.2.1-2.2.7 will have to set DEFAULT_PROBE to 0 in sadp_config.h
to avoid junk messages. Luckily, this problem has been fixed in
Linux 2.2 releases starting from 2.2.9 (or even 2.2.8).
- Type 'make clean' (no need for the first time)
- Type 'make'
This will compile the source code and create the binary.
If you have compilation or link problems, refer to
TROUBLESHOOTING section later in this file.
- Type 'sadp' or 'xsadp' to test the program.
If you have run-time problems, type 'man ./sadp.1' or
'man ./xsadp.1' to get the man page and refer to TROUBLESHOOTING
section there.
- If you like the program, install it with 'make install'
to install the binary and manual. You can also do it
separately by 'make install.bin' and 'make install.man'
- Enjoy.
CONFIGURATION.
Shell variables
Shell variables are processed by configuration script, and should be assigned before running 'configure'. IF you redefine some variables, type 'make wipe' to clean configuration cache before restarting 'configure'.
Currently supported shell variables:
CC - compiler name (usually gcc or egcs)
CFLAGS - compiler flags
If CC is omitted the configuration script looks for 'gcc', and then for 'egcs'. Default vaue of CFLAGS is "-m486 -O2".
Shell variables should be assigned using 'export', 'declare -x' or 'setenv' command depending on the shell used. Thus the following lines specify 'egcs' optimized for Pentium CPU in 'bash' shell:
export CC=egcs
export CFLAGS="-mpentium -O6"
Configure command line arguments.
As usually, with ./configure you can use --prefix, --bindir and --mandir. Default values:
--prefix=/usr/local
--bindir={prefix}/bin
--mandir={prefix}/man
The following additional parameters are accepted:
--without-x - don't configure for X version --without-console - don't configure for text-mode version --without-gpm - don't configure for direct GPM calls --with-xbindir=DIR - directory for xsadp, if different from sadp --with-xmandir=DIR - base directory for xsadp manual, if different from sadp manual
N.B. subdirectory /man1 is added automanically to xmandir.
Example. For
./configure -prefix=/usr --with-xbindir=/usr/X11/bin --with-xmandir=/usr/X11/man
the following paths are accepted
/usr/bin/sadp text-mode binary
/usr/man/man1/sadp.1 text-mode help
/usr/X11/bin/xsadp X-mode binary
/usr/X11/man/man1/xsadp.1 X-mode help
Makefile
GPM_SUPPORT and GPM_LIB: include/exclude libgpm support
Select one of two combinations listed in Makefile.
BINDIR: directory where binary file is installed (/usr/bin)
MANDIR: root man directory (/usr/man)
ZIPPED_MAN: 1 - man page is stored in compressed format
0 - man page is stored uncompressed
if not specified, makefile script will attempt
to select the most appropriate format
sadp_config.h
DSP_SUPPORT - include DSP support; needs <linux/soundcard.h>
ALSA_DSP_SUPPORT - include DSP support with ALSA; requires
DSP_SUPPORT, needs <linux/asound.h>
ALSA_MMAP_SUPPORT - include memory map with ALSA; requires
ALSA_DSP_SUPPORT and DSP_SUPPORT; need ALSA
driver 0.5 and <linux/asound.h>
MIXER_SUPPORT - include mixer support; needs <linux/soundcard.h>
ALSA_DSP_SUPPORT - include mixer support with ALSA; requires
MIXER_SUPPORT, needs <linux/asound.h>
SCSI_SUPPORT - include SCSI CD support; needs <scsi/scsi_ioctl.h>
CHANGER_SUPPORT - include CD multichanger support; needs linux 2.2+
UCDROM_SUPPORT - include unversal CDROM support
Support is included, if parameter is defined,
and excluded if parameter is undefined.
RCDDB_SUPPORT - includes support of Remote CD data bases.
If RCDDB support is disabled, the program is
completely unaware of Internet existence.
DEFAULT_DB_PATH - default path to local CD database.
DEFAULT_DB_ALTPATH - default path to shared CD database.
Empty string if not used
DEFAULT_WDB_NAME - default file name for WORKMAN-style data base
Comment out to exclude workman DB support
from sadp code.
DEFAULT_ZIP_TYPE - default DB compression format:
-1 no compression,
0 bzip2 (.bz2)
1 gzip (.gz)
2 compress (.Z)
DEFAULT_PROBE - default auto-probing: 1 - on, 0 - off
DEFAULT_AUTOPLAY - default auto-play: 1 - on, 0 - off
Refer to man page for description of those features
TIME_OUT_START - time-out(seconds) used at starting a disk
that was not playing originally
TIME_OUT_REPOSITION - time-out(seconds) used for changing
a position of playing disk
TIME_OUT_LOAD - time-out (seconds) used by disk load command
TIME_OUT_HELP_ADVANCE - time-out (milliseconds) between
Help/Info position change is slide mode.
Refer to man page for Help/Info details.
INTRO_DURATION_SEC - duration (seconds) of playing each track
in introduction mode
STEP_DISCRETE - duration(seconds) used by FORWARD and BACK
commands
NATIONAL_FONT - has to be defined if the font used is different
from ISO8859-1. Currently used in "misc" panel only.
DEFAULT_BACKGROUND_COLOUR - default background colour value
(console version only):
0 - black, 1 - red, 2 - green, 3 - brown,
4 - blue, 5 - magenta, 6 - cyan, 7 -grey
DEFAULT_X_FONT - default X font as foundry and family,
separated by a hyphen (both must be present).
DEFAULT_X_FONTRES - default X font resolution as resx and
resy, separated by a hyphen (both must be present).
Colour configuration (X version only):
DEFAULT_XCOLOUR_BKGR - default background colour
DEFAULT_XCOLOUR_FTOP - default foreground colour
for the main (top) panel
DEFAULT_XCOLOUR_FBOTTOM - default foreground colour
for bottom panels
The colours are specified, according to X standard (see
XLookupColor man page for description).
DEFAULT_BAR_WIDTH (X version only)
default bar with for spectrum analyser
DEFAULT_PIX_WIDTH (X version only)
default oscillator pixel width
DEFAULT_PIX_HEIGHT (X version only)
default oscillator pixel height
DEFAULT_OBTURATE (X version)
default obturation sttings for oscillator:
1-obturate, 0-no obturate
DEFAULT_OBTURATE (console version)
default obturation value (0-4)
same as -w command line argument (refer to man page)
ICON_WINDOW_SUPPORT (X version only)
include support for mini-windows in the code
USE_OLD_ICONS (X version only)
always use reduced colour icons as with version 1.x.x.
This will reduce program size, by excluding colour-
consuming icons from the code.
ICONS.
The following icon are provided for use with links (GoodStuff, shortcut etc)
sadp_16c.xpm - old 16colour 64x64
256-colour opaque background:
sadp_opaque_32x32.xpm
sadp_opaque_64x64.xpm
256-colour transparent background (for use with KDE):
sadp_transparent_32x32.xpm
sadp_transparent_64x64.xpm
TROUBLESHOOTING.
Compilation errors.
Most probably, you can get compilation errors, if one or several
headers file are missing. Assuming your root INCLUDE directory is
/usr/include, check that the following directories are present:
/usr/include/linux
/usr/include/asm
/usr/include/scsi (if SCSI_SUPPORT if defined)
The missing directories can be obtained from your distribution.
If the kernel was compiled on your computer, you have those
as subdirectories of linux kernel source distribution. Assuming
root directory of kernel source is /usr/src/linux, you need the
following commands (you need to be a root):
cd /usr/include
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/asm asm
ln -s /usr/src/linux/include/scsi scsi
Look for /usr/include/curses.h. If the file is missing, get
it from from libncurses distribution.
Look for /usr/include/gpm.h. If the file is missing, get
it from gpm distribution, or exclude GPM support in Makefile
(see CONFIGURATION section above)
If you still have troubles, find the name of missing file.
If messages do not fit into screen, redirect stderr to a file,
e.g.
gcc -c -Wall sadp_cdaudio.c 2>foo.lst
One the name is found, refer to CONFIGURATION section to see
if the reference to a particular header file can be avoided by
omitting a particular parameter in sadp_config.h.
If you still have problems, I bring my apologies.
Linkage errors.
Some libraries are not found. The may be located in a directory,
inaccessible to the linker. Use 'find' command to search for
the libraries, e.g.
find /usr -name 'libgpm*'
and provide the link to '/lib' directory if the file is found in
a non-standard location, e.g.
ln -s /foo/libgpm.so.1.10 /lib/libgpm.so.1
