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/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.

 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 before running the apps with these libs
 
 To see all available build options run:

        $ scons --help

 Note that scons saves the last used options in the clam.conf 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 install_prefix=/usr/local clam_prefix=/usr/local

 For further building options do :

        $ scons --help


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



1.1 Install CLAM dependencies on Linux

 Packages needed for Debian or Ubuntu 06.10 "Edgy" and 07.04 "Feisty":
 $ sudo apt-get install build-essential scons ladspa-sdk libxerces27-dev fftw-dev sfftw-dev libjack-dev libmad0-dev libogg-dev libsndfile1-dev libvorbis-dev libid3-3.8.3-dev libasound2-dev libfltk1.1-dev libjpeg62-dev libpng12-dev libxext-dev libxft-dev libqt3-headers libqt3-mt-dev doxygen qt4-dev-tools libqt4-dev libcppunit-dev portaudio19-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\...



