cannam@126: Install Instructions for libsamplerate cannam@126: ====================================== cannam@126: cannam@126: The following instructions explain how to install libsamplerate under cannam@126: Linux and other Unix like systems including Mac OSX. (For windows, cannam@126: see http://www.mega-nerd.com/SRC/win32.html). cannam@126: cannam@126: Preliminaries cannam@126: ------------- cannam@126: 1) Included with libsamplerate is a command line program named cannam@126: sndfile-resample which uses libnsdile: cannam@126: cannam@126: http://www.mega-nerd.com/libsndfile/ cannam@126: cannam@126: for file I/O. If you want to use sndfile-resample you need to cannam@126: ensure that libsndfile is correctly installed first. If it is, the cannam@126: command "pkg-config --cflags --libs sndfile" should print out cannam@126: something like this: cannam@126: cannam@126: -lsndfile cannam@126: cannam@126: If pkg-config doesn't exist you will need need to install it. If cannam@126: pkg-config cannot find libsndfile you may need install it. If you cannam@126: install from from a Linux distribution package, make sure you also cannam@126: install the libsndfile-devel package which contains the header files. cannam@126: cannam@126: If libsndfile is installed, you may need to set the PKG_CONFIG_PATH cannam@126: environment variable. If libsndfile is installed in /usr/local/lib, cannam@126: you will need to set PKG_CONFIG_PATH using: cannam@126: cannam@126: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig cannam@126: cannam@126: Pkg-config should now work. If it doesn't you need to fix it if you cannam@126: want to use sndfile-resample. cannam@126: cannam@126: 2) The included tests suite for libsamplerate needs libfftw3 which is cannam@126: available here: cannam@126: cannam@126: http://www.fftw.org/ cannam@126: cannam@126: If FFTW3 is not available, libsamplerate should still compile and cannam@126: install without problems but the test suite will not be as cannam@126: comprehensive as it normally is. cannam@126: cannam@126: Building cannam@126: -------- cannam@126: Building and verifying libsamplerate is a four or five step process. cannam@126: cannam@126: 1) The first step is to run configure cannam@126: cannam@126: ./configure cannam@126: cannam@126: which should print out something like the following: cannam@126: cannam@126: checking build system type... cannam@126: ... cannam@126: ... cannam@126: -=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- cannam@126: cannam@126: Configuration summary : cannam@126: cannam@126: Version : ..................... X.Y.Z cannam@126: Enable debugging : ............ no cannam@126: cannam@126: Tools : cannam@126: cannam@126: Compiler is GCC : ............. yes cannam@126: GCC major version : ........... 3 cannam@126: cannam@126: Extra tools required for testing and examples : cannam@126: cannam@126: Use FFTW : .................... yes cannam@126: Have libsndfile : ............. yes cannam@126: cannam@126: Installation directories : cannam@126: cannam@126: Library directory : ........... /usr/local/lib cannam@126: Program directory : ........... /usr/local/bin cannam@126: Pkgconfig directory : ......... /usr/local/lib/pkgconfig cannam@126: cannam@126: Compiling some other packages against libsamplerate may require cannam@126: the addition of "/usr/local/lib/pkgconfig" to the cannam@126: PKG_CONFIG_PATH environment variable. cannam@126: cannam@126: There are a number of configure options. See the output of cannam@126: configure when run with the --help command line option. cannam@126: cannam@126: 2) If all goes well with the above then compiling the library can be cannam@126: done with cannam@126: cannam@126: make cannam@126: cannam@126: 3) When that has finished, the test suite can be run using: cannam@126: cannam@126: make check cannam@126: cannam@126: 4) The final step is to install the library. This step needs to be cannam@126: carried out as the root user (or with sudo): cannam@126: cannam@126: make install cannam@126: cannam@126: This command will by default install the library in the directory cannam@126: /usr/local/lib. It can in installed in other location by using the cannam@126: --prefix option in step 1). cannam@126: cannam@126: 5) On linux, one more step is required, the registering of the library cannam@126: with the system. This is done by running the following command cannam@126: (also as the root user): cannam@126: cannam@126: ldconfig -v cannam@126: cannam@126: As a final test, you can run cannam@126: cannam@126: sndfile-resample cannam@126: cannam@126: to make sure everything is installed correctly. cannam@126: