2
# @(#)INSTALL 6.39 96/12/19
4
# xmcd - Motif(tm) CD Audio Player
5
# cda - Command-line CD Audio Player
14
Please read through the following notes before attempting to
15
compile and install xmcd and cda. If you encounter a problem,
22
You must have an ANSI C compatible compilation environment. All C
23
source code in this package are written in ANSI C syntax.
25
You must have X11R4/Motif 1.1 or later to build xmcd. Xmcd has been
26
successfully built under X11R4 with Motif 1.1, and X11R5 or X11R6 with
27
Motif 1.2 or Motif 2.0.
29
Motif is available from various third party vendors for those OS
30
platforms that do not come standard with the libraries and headers. If
31
you cannot find a commercial Motif product for your platform you can
32
also build the Motif library from the OSF sources (if you have the
35
Xmcd can also be built with the LessTif (freely available Motif clone)
36
package. As of this writing lessTif is still under development and the
37
package is not yet complete or mature. While xmcd will link and run
38
with the LessTif library in its current form, some of the features of
39
xmcd do not function correctly. However, the LessTif developers are
40
making quick progress, and if you don't have "real" OSF/Motif, you may
41
want to give LessTif a try. Visit their web site at:
43
http://www.hungry.com/products/lesstif/
45
In addition to Motif, xmcd requires the Xt Intrinsics and X11 libraries
46
(libXt and libX11) to compile. On systems that have multiple versions
47
of X11 installed, be sure to use matching sets of X11 header files with
50
If you do not have X11 or Motif, you can still build cda. Edit the top
51
level Makefile.std and remove xmcd_d from the SUBDIRS definition, and
52
follow the instructions below for systems that do not have imake.
54
The cda utility requires named pipe (FIFO) support in your OS
55
platform. If your system does not support named pipes, you must edit
56
the top level Imakefile or Makefile.std and remove the cda_d directory
57
from the SUBDIRS definition.
59
If your site runs the SOCKS-based security firewall and requires
60
clients to be SOCKSified in order to access remote Internet hosts, see
61
the comments in cddb_d/Imakefile. Also, you must edit the
62
xmcd_d/Makefile and cda_d/Makefile to link with the socks library. For
63
further information please refer to the documentation in the SOCKS.CSTC
67
PLATFORM-SPECIFIC COMPILE NOTES
68
-------------------------------
72
IF YOU USE THE GNU C COMPILER (gcc), DO NOT USE THE -ansi OPTION.
73
The -ansi option may cause some of the system's header files to
74
exclude definitions that are needed to successfully compile xmcd
79
Use gcc to compile the xmcd distribution. You may have to add
80
an explicit -DmacII to CFLAGS if your C pre-processor does not
83
You are advised to make certain that xmkmf uses the X11R5 config
84
files (e.g., /usr/local/X11R5/lib/config). The default config
85
files in Apple's distribution of X11R4 (/usr/lib/X11/config) will
86
require extensive hand-editing of the resulting Makefiles (to use
87
gcc instead of cc, shared-libs are not available, etc.).
91
See the README file for operating system version requirements.
93
You must ensure that _ANSI_SOURCE and _POSIX_SOURCE are _not_
96
The visual mode in cda is disabled by default for BSD/OS due to
97
the lack of a SYSV-compatible curses library. If you have added
98
the ncurses package to your system then you should remove the
99
-DNOVISUAL from your cda_d/Makefile to enable visual mode
104
You should use the instructions below for systems without imake
105
to build this distribution, since DG/UX does not provide imake.
106
A makedgux.inc is provided, which you should rename as make.inc.
108
Digital UNIX (OSF/1):
110
See the README file for minimum operating system version
113
On Digital UNIX 4.0 systems, the cc compiler imposes stricter
114
ANSI C conformance and the /usr/include/io/cam/scsi_all.h header
115
file on the system may not compile correctly. If you encounter
116
a compilation error in this file, you can fix it by changing
117
all structure bitfields in this file from u_char type to u_int.
118
Log in as root and type the following commands to accomplish
119
this (please substitute all occurrences of \t in the sed script
120
below with actual tab characters):
122
cd /usr/include/io/cam
123
mv scsi_all.h scsi_all.h.orig
124
sed 's/u_char\(.*:[ \t]*[0-9]*[ \t]*[;,].*\)/u_int\1/' \
125
scsi_all.h.orig > scsi_all.h
129
See the README file for minimum operating system version
130
requirements. Also, check the top level Makefile that's generated
131
by imake. There should be a SHELL=/bin/sh5 line. If there are
132
any other SHELL= lines they should be removed.
136
See the INSTALL.VMS file for information about the compilation,
137
installation and use of xmcd on the Digital OpenVMS platform.
141
See the README file for minimum operating system version
144
Hewlett Packard HP-UX:
146
You may have to add an explicit -D__hpux to CFLAGS if your C
147
pre-processor does not already define this. If the HP cc compiler
148
is used, you must enable ANSI C mode (using the -Ae or -Aa options,
149
depending on your HP-UX release). You may also have to define
150
-D_HPUX_SOURCE to successfully compile xmcd. See your cc(1) online
151
manual entry for details.
153
Special notes for the m68k systems: Don't use the +O3 option, use
154
the +02 option instead.
158
You may have to add an explicit -D_AIX to CFLAGS if your C
159
pre-processor does not already define this. Also, you must ensure
160
that the _BSD flag is _not_ defined.
162
If you are using IDE CD-ROM drives, and if you're compiling with
163
gcc (which does not seem to define _AIX41 internally), you must
164
define -DAIX_IDE in the libdi_d directory to enable the AIX IDE
165
ioctl method support in xmcd and cda. See the comments in the
170
Xmcd requires the C pre-processor flag -Dlinux to be set.
174
See the README file for minimum operating system version
177
The visual mode in cda is disabled by default for NetBSD due to
178
the lack of a SYSV-compatible curses library. If you have added
179
the ncurses package to your system then you should remove the
180
-DNOVISUAL from your cda_d/Makefile to enable visual mode
185
Make certain __QNX__ is defined from the top level on down;
186
The Watcom C 9.5 and 10.6 compilers do this for you. Depending on
187
your development environment, you may have to disable the visual mode
188
for cda, which relies on the ncurses library. To do so, add
189
-DNOVISUAL to your cda_d/Makefile.
191
SCO Open Desktop/SCO UNIX:
193
Xmcd requires the C pre-processor flag -Dsco (lower-case) to be
194
set. This is done by default on systems running the ODT
195
Development System. If you are using XFree86, you must modify the
196
appropriate "OsDefines" line in your
197
/usr/X386/lib/X11/config/x386.cf file to include -Dsco. Also, if
198
your imake configuration isn't fixed, you may need to explicitly
199
add -lintl and -lPW to your xmcd_d/Makefile in order to resolve
200
the regcmp(), regex() and alloca() routines.
204
You should use the GNU C compiler (gcc) instead of the cc compiler.
205
This is because the standard C compiler (cc) under Sony NEWS-OS is
206
not ANSI compliant. Also, you must add -Dsony_news to CFLAGS
207
if your C pre-processor does not already define it.
209
The visual mode in cda is disabled by default for NEWS-OS due to
210
the lack of a SYSV-compatible curses library. You should compile
211
all files in cda_d with -DNOVISUAL.
215
This release of xmcd/cda only supports the HP PA-RISC based
216
Stratus fault-tolerant servers. Earlier Intel i860 and
217
Motorola m68k based Stratus systems are not supported.
218
See the special notes in the FAQ file about setuid programs
219
and SVR4 dynamic libraries.
221
SunOS 4.1.x/Solaris 1.x:
223
You must use the GNU C compiler (gcc) instead of the cc compiler.
224
This is because the standard C compiler (cc) under SunOS 4.1.x is
227
You may encounter compiler warning messages when compiling the
228
cda utility. These are due to redundant definition of several
229
symbols between SunOS's <sys/ioctl.h> and <sys/termios.h> files.
230
You can ignore the warnings, as they are innocuous.
232
SunOS 5.x/Solaris 2.x:
234
Xmcd requires the C pre-processor defines -DSVR4 and -Dsun.
235
These should be defined by default. Xmcd also requires -Di386
236
on Intel x86 platforms.
238
You may need to add -lsocket to xmcd_d/Makefile and cda_d/Makefile
239
in order to resolve some external symbols. These include socket()
242
Likewise, you may need to add -lgen to xmcd_d/Makefile in order to
243
resolve some external symbols that Motif requires. These include
244
regcmp() and regex().
246
Be sure that /usr/ccs/bin is before /usr/ucb in your PATH
247
environment variable, to get the appropriate cc compiler.
248
This ensures that the proper SVR4 header files are used to compile
251
On Solaris 2.2 or later, you may wish to add -DSOL2_RSENSE to
252
the libdi_d/Makefile to enable support for the auto request-sense
255
See the special notes in the FAQ file about setuid programs and
256
SVR4 dynamic libraries.
260
You may need to add -lsocket to xmcd_d/Makefile and cda_d/Makefile
261
in order to resolve some external symbols. These include socket()
264
Likewise, you may need to add -lgen to xmcd_d/Makefile in order to
265
resolve some external symbols that Motif requires. These include
266
regcmp() and regex().
268
See the special notes in the FAQ file about setuid programs and
269
SVR4 dynamic libraries.
275
You must compile on one of the supported UNIX OS flavors (See the
276
README file for a list of the supported OS environments) to get a
277
real functional xmcd. You can compile on other platforms, but you
278
will end up with a "demo" version of xmcd.
280
You can also force the build of the demo version by specifying
281
-DDEMO_ONLY when compiling in the libdi_d directory. See the
282
comments in libdi_d/Imakefile.
284
It should be possible to build the demo-only xmcd on any platform
285
that supports compiling a Motif application. Minor porting work
286
may be required on systems that aren't POSIX-compliant.
288
The "demo" version does not actually control or respond to a real
289
CD-ROM device. Instead, a built-in CD-ROM simulater is used,
290
which allows you to play with the look-and-feel of xmcd/cda and try
291
the behavior of all the controls and functions.
293
If you are running the demo version of xmcd/cda, the following message
294
will be displayed on stderr when you start the program:
296
CD-ROM simulator version x.xx (pid=xxxxx) starting...
302
Digital OpenVMS users please see the INSTALL.VMS file for information.
303
Users of other systems please use the instructions below.
305
If your system has imake (most supported systems do), use these
306
steps to build xmcd and cda:
308
1. Take a look at the Imakefiles in various directories, read
309
the comments, and make changes as appropriate. Pay special
310
attention to the comments in xmcd_d/Imakefile pertaining to
311
the LOCAL_LIBRARIES=XmClientLibs line. You may need to change
312
it in order to successfully compile xmcd.
313
2. Change to the xmcd top level source directory.
314
3. Type "xmkmf" (or "imake -DUseInstalled -I/usr/lib/X11/config")
315
4. Type "make Makefiles"
318
If your system does not have imake, use these steps to build xmcd:
320
1. Change to the xmcd top level source directory.
321
2. Edit make.inc. You will most certainly need to make some
322
changes in this file to make things compile on your OS
324
3. Type "make -f Makefile.std Makefile"
325
4. Type "make Makefiles"
332
Digital OpenVMS users please see the INSTALL.VMS file for information.
333
Users of other systems please use the instructions below.
335
1. Log in as the super-user and change to the xmcd source directory.
336
Super-user status is used to set the permissions of all files
337
and ensures that you have write privilege to all target
338
directories. If any target directory is an NFS remote resource,
339
however, the super-user status may be insufficient and you will
340
need to manually install some files and set their permissions.
341
2. You may want to strip(1) the symbol table of the cda_d/cda,
342
xmcd_d/xmcd and dbconv_d/wm2xmcd binaries to reduce their size.
343
On some platforms, you can also use mcs(1) with the -d option to
344
remove the binary comment section.
345
3. Type "make install". Answer all questions to configure xmcd and
346
cda. This step is REQUIRED. If you do not configure the
347
software using "make install" it will not run correctly.
348
Install errors, if any, are recorded in the /tmp/xmcd.err file.
349
4. Edit LIBDIR/xmcd/config/common.cfg and make sure that the "device:"
350
path matches the default raw CD-ROM device on your system
351
(LIBDIR varies depending on the OS platform environment, but is
352
typically /usr/lib/X11).
353
5. Edit LIBDIR/app-defaults/XMcd and make sure that the "XMcd*libdir:"
354
path is correct. Xmcd will not run properly if this is wrong.
355
6. You may need to change the XMcd*cddbMailCmd resource in the
356
LIBDIR/app-defaults/XMcd file to match the requirements of your
357
local mailer. For example, A/UX sites should use mush(1)
358
instead of mail(1). You must use a mailer that can accept a
359
command-line argument to specify the mail Subject. Otherwise,
360
the CDDB mail will be rejected by the archive server.
361
7. The install.sh script only places the man page raw files in the
362
designated directories. Depending on your OS platform, you may
363
need to hand format the files using nroff(1) with the -man option.
366
TO MAKE A BINARY RELEASE
367
------------------------
369
1. Follow the Build Instructions as above.
370
2. Make sure the binary you build has the proper mix of static vs.
371
shared/dynamic library components for your target system. In
372
particular, if your target system does not have Motif installed,
373
then you will want to statically link libXm.a. The same
374
consideration should be given to libXt, libXext, libX11, libnsl,
375
libsocket, libc, and others where applicable. The more
376
libraries you link statically, the less platform-dependent the
377
binary is, but the larger it becomes. In some cases, even a
378
fully static xmcd binary will still have problem running if the
379
target system has different kernel-to-library interfaces than
380
the compiling system.
381
2. Run the "misc_d/makerel.sh" script. The script generates a file
382
"xmcdbin.tar.gz", which is a "gzip"ed tar format file containing
383
all files necessary for a xmcd binary distribution. It also
384
creates a "xmcdbin.uue" file, which is a uuencoded version of
385
the xmcdbin.tar.gz file suitable for transmission via electronic
386
mail. This script assumes the existence of the GNU zip (gzip)
387
and uuencode utilities.
388
3. Consult the OSF/Motif licensing terms pertaining to your version
389
of Motif before distributing binaries containing Motif code to
393
TO MAKE A SOURCE RELEASE
394
------------------------
396
Run the "misc_d/makesrc.sh" script. The script generates a file
397
"xmcdsrc.tar.gz", which is a "gzip"ed tar format file containing all
398
xmcd source files. It also creates a "xmcdsrc.uue" file, which is a
399
uuencoded version of the xmcdsrc.tar.gz file suitable for transmission
400
via electronic mail. This script assumes the existence of the GNU zip
401
(gzip) and uuencode utilities.
403
Alternatively, you can use the "misc_d/makeshar.sh" script. This
404
generates a multi-part shar archive of the source code instead. Note
405
that makeshar.sh assumes the existence of the "shar" program as
406
provided in the "cshar" package from Rich Salz. Other shar
407
implementations may support different command line parameters which is
408
incompatible with cshar. The makeshar.sh must be modified to
415
The "config.sh" shell script supplied with this distribution is not
416
intended to be run directly in the libdi_d source directory. You
417
should use "make install" to install the package, which causes
418
config.sh to be executed with the proper environment. If you must
419
reconfigure xmcd/cda, run the copy of "config.sh" as installed in
420
LIBDIR/xmcd/config (where LIBDIR is typically /usr/lib/X11).