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