file: INSTALL			G. Moody	30 January 2000
				Last revised:	  2 March 2006
WFDB Software Package installation notes

These notes are infrequently updated, but are included here for those who may
not have ready access to the World Wide Web.  For those who do, please visit
PhysioNet, where up-to-date quick-start guides including installation notes
for popular operating systems are available (find a guide for your platform at
http://physionet.org/physiotools/wfdb.shtml).

Although ready-to-run binaries are available for several popular platforms,
we strongly recommend building the WFDB Software Package from sources.  Doing
so is the best way to ensure that the components of the package will work
together properly on your system, and that your software is up-to-date.  The
process of building the package is simple and quick.  

The GNU C compiler (gcc) is available freely for all platforms, and it is
strongly recommended.  We will help you to solve any problems you may encounter
in building the WFDB Software Package using gcc on your platform; our
experience has been that such builds are trouble-free if you follow the
instructions in our quick-start guides (see above).

Some users have reported success in compiling the WFDB Software Package, except
for WAVE, using various commercial compilers.  We don't use or recommend these
compilers, and we offer no instructions or support for doing so whatsoever.  If
you choose to use one of these unsupported compilers, you are on your own!

PREPARATION

There are three prerequisites for a complete build.  All are free, open-source
software available for all popular platforms:

 * Software development tools (make, gcc, X11 libraries and *.h files, etc.)

     + GNU/Linux, Unix, etc.:  usually included

     + Mac OS X: install Mac OS X Developer Tools, X11 for Mac OS X, X11 SDK
       (all included in current Mac OS X CD sets)

     + MS-Windows: Install Cygwin, including (at least) the following optional
       packages: bc, curl-devel, gcc, gcc-mingw, gv, ImageMagick, make,
       sunrpc, and xorg-x11-devel.  (Other required packages will be installed
       automatically if those listed are selected.)  Detailed instructions
       are available at
	    http://physionet.org/physiotools/cygwin/

 * An HTTP client library, either libcurl (preferred) or libwww

     + GNU/Linux, Unix, etc.:  usually included, or from http://curl.haxx.se/
       (libcurl) or http://www.w3.org/Library/ (libwww)

     + Mac OS X: install libcurl or libwww (both base and development packages)
       from Fink (http://fink.sourceforge.net)

     + MS-Windows: install curl-devel from Cygwin (see above)

     One or both of these libraries may already be installed on your system;
     to check, try running the commands
	curl-config --version
	libwww-config --version

 * The XView libraries and *.h files

     All platforms: free from http://physionet.org/physiotools/xview/

Detailed instructions for obtaining and installing these prerequisites are
included in the WFDB quick-start guides for the popular platforms (see above).
Brief notes about other platforms are at the end of this file.


BUILDING AND INSTALLING

Once you have installed the necessary prerequisites, the WFDB installation
process is the same on all platforms:

1. Open a terminal emulator window and navigate to the top-level directory
   of the WFDB sources (the directory that contains this file).

2. In this directory, build and install the WFDB Software Package by typing:
	./configure
	make install
   Except under MS-Windows, you will normally need root permissions to run
   'make install'.  If you don't have root permissions, set WFDBROOT to the
   name of a directory in which you have permission to write (you will be
   given a chance to do this when running 'configure').

3. In this directory, test the installation by typing:
	make check
   If there are any errors, look in the checkpkg directory for details.


FURTHER READING

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
by looking in http://physionet.org/physiotools/manuals.shtml.

Many frequently asked questions about this software are answered in the
PhysioNet FAQ (http://physionet.org/faq.shtml).


UNINSTALLING

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-DOS, MacOS 9 and earlier, 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 MS-DOS and
Macintosh users (and on OS/2 and 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.

Often vendors of proprietary compilers and operating systems provide little or
no documentation about how to build libraries (especially shared/dynamically
linked libraries), although there may be clear and simple instructions for
compiling C programs that use the vendor's own libraries only.  If this
describes your situation, you may find it easiest to compile the WFDB library
sources as ordinary source files together with the programs that use the WFDB
library functions.  This approach won't yield the benefits of reduced
compilation time and reduced executable size available on platforms that
support shared libraries, but it should allow you to compile and run the WFDB
software (except for WAVE) with a minimum of difficulty.

If you find that changes are necessary in order to compile this software
successfully on your platform, 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!
