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