file: INSTALL			G. Moody	30 January 2000
				Last revised:	 19 June 2002
WFDB Software Package installation notes

These notes are included here for those who may not have ready access to the
World Wide Web.  For those who do, please visit PhysioNet, where quick-start
guides including installation notes for popular operating systems are available
(see http://www.physionet.org/physiotools/wfdb.shtml).

_______________________________________________________________________________

Under UNIX or Linux:

1. Install the World Wide Web Consortium's libwww library (you will need both
   the library itself and the developer's package;  download them from
   http://www.physionet.org/physiotools/libwww/, or from the W3C's web site
   at http://www.w3.org/Library).  You may skip this step if you don't want
   support for reading input files from remote web and FTP servers.  See
   README.NETFILES for further information about this option.

2. WAVE is an optional part of the WFDB Software Package.  If the XView
   toolkit is available for your system, installing WAVE is highly recommended.
   Otherwise, go on to step 3;  after completing the WFDB software package
   installation, you may wish to try GTKWave (an experimental version of WAVE
   that uses the GTK+ GUI, which is available for many other versions of Unix).

   Install the XView library (see http://www.physionet.org/physiotools/xview/)
   if you want to use WAVE, and be sure that the directory that contains the
   XView application 'textedit' (usually /usr/openwin/bin) is in your PATH.
   For information about WAVE, see the WAVE User's Guide,
   http://www.physionet.org/physiotools/wug/.

   Copy the contents of http://www.physionet.org/physiotools/wug/ into
   /usr/local/help/html/wug if you wish to read the help from local files;
   otherwise, edit wave/wave.info and change all occurrences of
   '/usr/local/help/html/' into 'http://www.physionet.org/physiotools/wug/'.
   (The utility 'wget' -- which you can find on PhysioNet -- can be helpful
   if you wish to copy an entire directory of a web site, as suggested
   here.)

3. In this directory, type:
	./configure
	make install
   You will need root permissions to run 'make install', unless you change
   WFDBROOT so that the files are installed in a directory that you own (you
   will be given a chance to do this when running 'configure').

4. If for any reason you wish to uninstall the WFDB Software Package, type:
	make uninstall
   from this directory.  You will need root permissions to uninstall unless
   you changed WFDBROOT before installing the package.

_______________________________________________________________________________

Under MS-Windows:

1. If you have not already done so, install the Cygwin development environment
   (freely available from http://sources.redhat.com/cygwin/).  This includes
   gcc (the GNU C/C++ compiler) as well as a comprehensive assortment of other
   Unix utilities ported to MS-Windows.  Accept the defaults suggested by the
   installer.

   See the notes near the end of this section for information contributed by
   users about using proprietary compilers.

2. Download http://www.physionet.org/physiotools/binaries/windows/bin/which.exe
   and put it into a directory in your PATH.  (This utility is needed by
   'configure' in a later step.  The sources for which.exe are available within
   http://www.physionet.org/physiotools/utilities/.)

3. Open a Cygwin terminal window (the Cygwin installer will have added this to
   your MS-Windows start menu).  Check that 'which' and 'gcc' are accessible by
   typing the command:
	which gcc
   The output of this command should be:
	/usr/bin/gcc
   If you don't see this output, repeat steps 1 and 2 above as necessary to
   correct the problem before continuing.

4. Install the World Wide Web Consortium's libwww library (you will need both
   the library itself and the developer's package;  download them from
   http://www.physionet.org/physiotools/libwww/, or from the W3C's web site
   at http://www.w3.org/Library).  You may skip this step if you don't want
   support for reading input files from remote web and FTP servers.  See
   README.NETFILES for further information about this option.

5. In this directory (the top-level directory of the WFDB software package,
   containing the file you are now reading), type:
	./configure
	make install

6. If for any reason you wish to uninstall the WFDB Software Package, type:
	make uninstall
   from this directory.

...............................................................................

Using proprietary compilers

   IMPORTANT:  Although you may be able to compile the WFDB software package
   using a proprietary compiler, this is NOT SUPPORTED.  Cygwin 'gcc' is free,
   robust, and supported -- please give it a try!

   If, despite the above, you feel that you must use a proprietary compiler,
   this section contains notes contributed by other users who have done so.
   The developers of the WFDB software package do not use any of these
   compilers, so you are on your own if you choose to use one of them.

   Between 1985 and 1995, previous versions of this software were compiled
   using Borland C/C++, Microsoft C/C++, and Turbo C/C++.  These compilers
   came bundled with 'make'-like utilties (Microsoft's was called 'nmake').
   If you are using one of these compilers, you may be able to use the
   'Makefile.dos' files in several of the subdirectories of this one to
   perform an automated compilation of the WFDB software package, although you
   will need to customize these 'Makefile.dos' files for your compiler. Your
   feedback is appreciated.

Borland C++ Builder

   Thanks to Ion Gaztaaga for these notes.

1. Edit lib/wfdb.h to define WFDB_NETFILES as 0 (do not compile with libwww
   support).  It's possible that libwww support will work, but this has not
   been tested.

2. Build a static library (wfdb.lib) from the sources in the 'lib' directory,
   selecting:
	C calling convention
	Borland Language compliance
	Others:  Borland C++ Builder default settings

_______________________________________________________________________________

Under MacOS or other operating systems

Sorry, but you are on your own here.  Previous versions of the WFDB library
and some of the applications have been compiled successfully by Macintosh
users (and on VMS, among other environments).  The sources are written in
highly portable C and should not be difficult to port to any environment where
an ANSI/ISO or K&R C compiler and the standard C library are available.

Several users have reported that the WFDB library and the applications in the
'app' directory can be compiled successfully using cc (gcc) under MacOS/X
(Darwin).

If you find that changes are necessary in order to compile this software
successfully, please send details to the author (george@mit.edu) so that
others can benefit from your experience.  Contributions of working binaries
are welcome, but please write first before sending them to me. Thanks!

_______________________________________________________________________________

Once you have successfully compiled and installed the WFDB Software Package,
you will find a great deal of information about using it on PhysioNet;  begin
looking in http://www.physionet.org/physiotools/wfdb-books.shtml.
