This file explains how to compile and install the CLAM libraries and 
applications from the source tarballs. Alternatively, CLAM website
provides already compiled packages for several platforms.

 1. Install CLAM dependencies

 This step is different for each architecture (Linux, Windows, MacOSX)
 Please, refere to the specific instructions below.
 
   
 2. Compile CLAM libraries from the source

 Checkout the subversion repository
 $ svn co http://iua-share.upf.edu/svn/clam/trunk 

 Or download the CLAM tarball (stable release or cvs snapshot) from the 
 web: [http://clam.iua.upf.es/download.html] 
 
 Change directory to CLAM/
 NEW! (April 4th) build directory is now CLAM/ instead of CLAM/scons/libs

 The simplest way to build and install the libraries is issuing :

        $ scons configure
        $ scons
        $ sudo scons install
 
 This will compile all the libraries with default options, and install
 them to the default dirs ( /usr/local/lib/ and /usr/local/include/ )

 Troubleshooting: in some scenarios, the first scons command ends with error
 and is necessary to re-run scons a second time.
 
 Tip: use "scons -j3" to take advantadge of multi-threading if you machine is a dual-core.

 To install clam in a non system-wide place (usefull when developing) use 
 scons configure with these options: (you must create the destination dir before)

	$ scons configure prefix=~/local
 
 Then export LD_LIBRARY_PATH=~/local/lib before running the apps with these libs.
 (Probably you also want to add this export line into your .bashrc)
 
 To see all available build options run:

        $ scons --help

 Note that scons saves the last used options in the options.cache file. 
 These options will be used by default in further "scons" commands.

 MacOSX specific: the equivalent to LD_LIBRARY_PATH in mac is DYLD_LIBRARY_PATH.
   

 3. Compile the CLAM application.

 Applications can be download from the CLAM website in separate tarballs.
 If you are using svn they are folders at the CLAM trunk.
 Go to the root of the application source tree and issue: (maybe changing the prefix)

        $ scons prefix=/usr/local clam_prefix=/usr/local

 For further building options do :

        $ scons --help


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



1.1 Install CLAM dependencies on Linux

 Debian, Ubuntu 06.10 "Edgy" and 07.04 "Feisty" 
 (do "sudo apt-get install <packages>")

 * Packages to compile clam libs:
 build-essential scons ladspa-sdk libxerces27-dev fftw-dev sfftw-dev fftw3-dev libjack-dev libmad0-dev libogg-dev libsndfile1-dev libvorbis-dev libid3-3.8.3-dev libasound2-dev portaudio19-dev 

 * Qt4 packages to compile NetworkEditor and Annotator:
 qt4-dev-tools libqt4-dev

 * Qt3 packages to compile SMSTools and Voice2MIDI:
 libqt3-headers libqt3-mt-dev 

 * Additional packages for developing:
 doxygen libcppunit-dev


 
 Redhat / Fedora Core packages list (tested with FC5)
   gcc-c++ scons fftw2-devel fltk-devel libvorbis-devel libogg-devel qt-devel
   qt-designer libxml++-devel alsa-lib-devel libsndfile-devel ladspa-devel 
   id3lib-devel libXi-devel 
   Unofficial Pakages:
   libmad-devel (lvn5) jack-audio-connection-kit-devel (rhfc5.ccrma)
   qt4-devel, qt4 



1.2 Install CLAM dependencies on Mac OSX

Build instructions for CLAM in Mac OSX are currently in this wiki:

http://iua-share.upf.edu/wikis/clam/index.php/Devel/Mac_OSX_build

Please report to the clam-devel list any problem or things to improve.
http://clam.iua.upf.edu/mailinglist.html



1.3 Install CLAM dependencies on Windows
 
  Required Tools
  --------------

 * cl.exe command line compiler from Microsoft 
   (it comes with Microsoft Visual C++ 7.1).
 * python and scons installed on the system.
 * make sure that any needed tool have its directory added to the 
   PATH variable (in order to execute cl and scons)
   In particular you'll need all the 3rd party library DLLs in the PATH.
 * if you want to create installer you'll need nsis scripting language. 
   You can download it from [http://nsis.sourceforge.net/Main_Page] 
 
  3rd party libraries
  -------------------
  
  You can download the needed external libraries to build CLAM library 
  on the CLAM web [http://clam.iua.upf.edu/download/win/other/windows-external-libs.tar.gz]
  Please make sure that they are installed on a common base directory. 
  i.e:
        devel\CLAM\
        devel\xercesc\ 
        devel\fftw\
        devel\...



