#
# @(#)INSTALL	2.20 94/02/16
#
Xmcd (Motif(tm) CD Audio Player) by Ti Kan
------------------------------------------

Please read through the following notes before attempting to
compile and install xmcd.

You must have X11R4/Motif 1.1 or later to build xmcd.  Xmcd has been
successfully built under both X11R4 + Motif 1.1 and X11R5 + Motif 1.2.
If you are running Motif 1.1, I recommend version 1.1.4 or later.
Also, you must have an ANSI C compatible compilation environment.

Xmcd can be built using the native X libraries that are supplied with
your OS release.  If you have XFree86 installed, you can also build
xmcd using the libraries from the XFree86 distribution.  Make sure
you use the right set of X include files to match!  Motif is not a
part of the XFree86 package, so you will need to get it separately.
Motif is available from various third party vendors for those OS
platforms that do not come standard with the libraries and headers.


Platform-specific Notes
-----------------------

All Platforms:
    On all platforms, if you use gcc, you must use the
    -fwritable-strings option to gcc.  Otherwise, you may experience
    core dumps when running xmcd.

    Depending on your OS platform, you may also need to specify
    -fpcc-struct-return and/or the -traditional option to gcc.

DEC OSF/1 on Alpha AXP:
    See the README file for minimum operating system version
    requirements.  Xmcd requires the C pre-processor flags -D__alpha
    and -D__osf__ to be set.  This is normally pre-defined, but if
    your environment does not, you will have to add them explicitly.

DEC Ultrix 4.3 on MIPS-based DECstations:
    See the README file for minimum operating system version
    requirements.  Xmcd requires the C pre-processor flag -D__ultrix
    to be set. This is normally pre-defined, but if your environment
    does not, you will have to add them explicitly.

HP-UX 9.x on PA-RISC:
    You may have to add an explicit -D__hpux to CFLAGS if your C
    pre-processor does not already define this.  If the HP cc compiler
    is used to compile xmcd, the -Ae option must be used (to enable
    ANSI C mode).  Depending upon your specific version of HP-UX, you
    may also have to define -D_HPUX_SOURCE to successfully compile
    xmcd.  See your cc(1) online manual entry for details.

IBM AIX 3.2 on RS/6000:
    You may have to add an explicit -D_AIX to CFLAGS if your C
    pre-processor does not already define this.  Also, you must ensure
    that the _BSD flag is _not_ defined.

Linux on x86:
    Xmcd requires the C pre-processor flag -Dlinux to be set.  This is
    done by default with the XFree86 distribution that is included
    with most Linux releases.  If your system does not #define linux
    for you, then you will have to add -Dlinux explicitly.

SCO Open Desktop/SCO UNIX on x86:
    Xmcd requires the C pre-processor flag -Dsco (lower-case) to be
    set.  This is done by default on systems running the ODT
    Development System.  If you are using XFree86, you must modify the
    appropriate "OsDefines" line in your
    /usr/X386/lib/X11/config/x386.cf file to include -Dsco.  Also, if
    your imake configuration isn't fixed, you may need to explicitly
    add -lintl and -lPW to the EXTRA_LIBRARIES line in your Makefile
    in order to resolve the regcmp(), regex(), and alloca() routines.

Silicon Graphics Irix on SGI workstations:
    Xmcd requires the C pre-processor flag -Dsgi to be set.  This is
    normally pre-defined, but if your environment does not, you will
    have to add them explicitly.

SunOS 4.1.x/Solaris 1.x on sparc:
    Xmcd requires the C pre-processor define -Dsun, which should be
    defined by default.  You must use the GNU C compiler (gcc) instead
    of the cc compiler.  This is because cc under SunOS 4.1.x is not
    ANSI compliant.

SunOS 5.x/Solaris 2.x on sparc/x86:
    Xmcd requires the C pre-processor defines -DSVR4 and -Dsun.
    These should be defined by default.  Xmcd also requires -Di386
    on Intel x86 platforms.  On Solaris 2.2 or later, you may wish to
    add -DSOL2_RSENSE to enable support for the auto request-sense
    feature.

UNIX SVR4.x on x86:
    Xmcd requires the C pre-processor flag -DSVR4 and -Di386
    to be set.  This is normally pre-defined, but if your environment
    does not, you will have to add them explicitly.


Xmcd Demo Mode
--------------

You must compile on one of the supported UNIX OS flavors (See the
README file for a list of the supported OS environments) to get a
real functional xmcd.  You can compile on other platforms, but you
will end up with a "demo" version of xmcd.

You can also force the build of the demo version by specifying
-DDEMO_ONLY.  See the comments in Imakefile.  The demo version
has been successfully compiled and run on the following OS platforms:

	HP-UX 9.0 on HP-9000 Series 700 on PA-RISC
	IBM AIX 3.2 on RS/6000
	Linux 0.99plxx on x86
	OSF/1 1.0 on HP-9000 Series 700 on PA-RISC
	OSF/1 1.2 on DEC Alpha
	OSF/1 1.3 on DEC Alpha
	SCO ODT 2.0 on x86
	SCO ODT 3.0 on x86
	Stratus SVR4.0 FTX 2.1 on i860
	Stratus SVR4.0 FTX 2.2 on i860, i860MP
	SunOS 4.1.2 on Sun Sparc
	UNIX SVR4.0 on x86
	UNIX SVR4.2 on x86
	UNIX SVR4.2MP on x86
	Ultrix on DECstation MIPS

It should be possible to build the demo-only xmcd on other OS platforms
not listed, as long as the system supports compiling a Motif application.

The "demo" version does not actually control or respond to a real
CD-ROM device.  Instead, a built-in CD-ROM simulater is used,
which allows you to play with the look-and-feel of xmcd and try
the behavior of all the controls and functions.

If you are running the demo version of xmcd, the following message
will be displayed on stderr when you start xmcd:

    CD-ROM simulator version x.xx (pid=xxxxx) starting...


Build instructions
------------------

1. Take a look at Imakefile, read the comments, and make changes as
   appropriate.  Pay special attention to the comments pertaining
   to the LOCAL_LIBRARIES line.
2. Type "xmkmf" (or "imake -DUseInstalled -I/usr/lib/X11/config")
3. Type "make Makefiles"
4. Type "make depend"
5. Type "make"


Install instructions
--------------------

1. You may want to strip(1) the symbol table of the xmcd and wm2xmcd
   binaries to reduce their size.  On some platforms, you can also
   use mcs(1) with the -d option to remove the binary comment section.
2. Log in as the super-user and change to the xmcd source directory.
3. Type "make install".  Answer all questions to configure xmcd.
   This step is REQUIRED.  If you do not configure xmcd using
   "make install" it will not run correctly.
4. Edit LIBDIR/app-defaults/XMcd and make sure that the "XMcd.device:"
   path matches the default raw CD-ROM device on your system (LIBDIR
   varies depending on the OS platform environment, but is typically
   /usr/lib/X11).


To make a binary release
------------------------

1. Follow the Build Instructions as above.
2. Make sure the binary you build has the proper mix of static vs.
   shared library components for your target system. In particular,
   if your target system does not have Motif installed, then you
   will want to statically link libXm.a.  The same consideration
   should be given to libXt, libXext, libX11, libnsl, libsocket,
   libc, and others where applicable.  The more libraries you link
   statically, the less platform-dependent the binary is, but the
   larger it becomes.  In some cases, even a fully static xmcd binary
   will still have problem running if the target system has different
   kernel-to-library interfaces than the compiling system.
2. Run the "makerel.sh" script.  The script generates a file
   "xmcdbin.uue", which is a compressed and uuencoded tar format
   file containing all files necessary for a xmcd binary distribution.


To make a source release
------------------------

1. Run the "makesrc.sh" script.  The script generates a file
   "xmcdsrc.uue", which is a compressed and uuencoded tar format
   file containing all xmcd source files.


Additional Notes
----------------

In order to use the "real" (non-demo) xmcd, you must be running one
of the supported OS platforms (see the README file).  Also, your system
must be set up properly to use a CD-ROM drive.  A good test is to see
if you can mount ISO-9660/High Sierra CD-ROM filesystems.  If your
system does not support ISO-9660 but otherwise supports a raw CD-ROM
device, you can try typing this command while logged in as the
super-user (with a DATA CD loaded in the CD-ROM drive):

	dd if=DEVICE of=/dev/null bs=2k count=10

where DEVICE is the raw CD-ROM device, such as /dev/rcd0 (SCO ODT),
/dev/rcdrom/cdrom1 (SVR4.2/x86) or /dev/rsr0 (SunOS 4.1.x).

If the dd command fails, then either your hardware is not set up
properly, or your OS is not configured to support the CD-ROM device.
You should fix the problem first before attempting to run xmcd.

The "configure.sh" shell script supplied with xmcd is not intended
to be run directly in the source directory.  You should use
"make install" to install the package, which causes configure.sh
to be executed with the proper environment.  If you must reconfigure
xmcd, run the copy of "configure.sh" as installed in LIBDIR/xmcd/config
(where LIBDIR is typically /usr/lib/X11).

