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