annotate src/libsamplerate-0.1.8/INSTALL @ 0:c7265573341e

Import initial set of sources
author Chris Cannam
date Mon, 18 Mar 2013 14:12:14 +0000
parents
children
rev   line source
Chris@0 1 Install Instructions for libsamplerate
Chris@0 2 ======================================
Chris@0 3
Chris@0 4 The following instructions explain how to install libsamplerate under
Chris@0 5 Linux and other Unix like systems including Mac OSX. (For windows,
Chris@0 6 see http://www.mega-nerd.com/SRC/win32.html).
Chris@0 7
Chris@0 8 Preliminaries
Chris@0 9 -------------
Chris@0 10 1) Included with libsamplerate is a command line program named
Chris@0 11 sndfile-resample which uses libnsdile:
Chris@0 12
Chris@0 13 http://www.mega-nerd.com/libsndfile/
Chris@0 14
Chris@0 15 for file I/O. If you want to use sndfile-resample you need to
Chris@0 16 ensure that libsndfile is correctly installed first. If it is, the
Chris@0 17 command "pkg-config --cflags --libs sndfile" should print out
Chris@0 18 something like this:
Chris@0 19
Chris@0 20 -lsndfile
Chris@0 21
Chris@0 22 If pkg-config doesn't exist you will need need to install it. If
Chris@0 23 pkg-config cannot find libsndfile you may need install it. If you
Chris@0 24 install from from a Linux distribution package, make sure you also
Chris@0 25 install the libsndfile-devel package which contains the header files.
Chris@0 26
Chris@0 27 If libsndfile is installed, you may need to set the PKG_CONFIG_PATH
Chris@0 28 environment variable. If libsndfile is installed in /usr/local/lib,
Chris@0 29 you will need to set PKG_CONFIG_PATH using:
Chris@0 30
Chris@0 31 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Chris@0 32
Chris@0 33 Pkg-config should now work. If it doesn't you need to fix it if you
Chris@0 34 want to use sndfile-resample.
Chris@0 35
Chris@0 36 2) The included tests suite for libsamplerate needs libfftw3 which is
Chris@0 37 available here:
Chris@0 38
Chris@0 39 http://www.fftw.org/
Chris@0 40
Chris@0 41 If FFTW3 is not available, libsamplerate should still compile and
Chris@0 42 install without problems but the test suite will not be as
Chris@0 43 comprehensive as it normally is.
Chris@0 44
Chris@0 45 Building
Chris@0 46 --------
Chris@0 47 Building and verifying libsamplerate is a four or five step process.
Chris@0 48
Chris@0 49 1) The first step is to run configure
Chris@0 50
Chris@0 51 ./configure
Chris@0 52
Chris@0 53 which should print out something like the following:
Chris@0 54
Chris@0 55 checking build system type...
Chris@0 56 ...
Chris@0 57 ...
Chris@0 58 -=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
Chris@0 59
Chris@0 60 Configuration summary :
Chris@0 61
Chris@0 62 Version : ..................... X.Y.Z
Chris@0 63 Enable debugging : ............ no
Chris@0 64
Chris@0 65 Tools :
Chris@0 66
Chris@0 67 Compiler is GCC : ............. yes
Chris@0 68 GCC major version : ........... 3
Chris@0 69
Chris@0 70 Extra tools required for testing and examples :
Chris@0 71
Chris@0 72 Use FFTW : .................... yes
Chris@0 73 Have libsndfile : ............. yes
Chris@0 74
Chris@0 75 Installation directories :
Chris@0 76
Chris@0 77 Library directory : ........... /usr/local/lib
Chris@0 78 Program directory : ........... /usr/local/bin
Chris@0 79 Pkgconfig directory : ......... /usr/local/lib/pkgconfig
Chris@0 80
Chris@0 81 Compiling some other packages against libsamplerate may require
Chris@0 82 the addition of "/usr/local/lib/pkgconfig" to the
Chris@0 83 PKG_CONFIG_PATH environment variable.
Chris@0 84
Chris@0 85 There are a number of configure options. See the output of
Chris@0 86 configure when run with the --help command line option.
Chris@0 87
Chris@0 88 2) If all goes well with the above then compiling the library can be
Chris@0 89 done with
Chris@0 90
Chris@0 91 make
Chris@0 92
Chris@0 93 3) When that has finished, the test suite can be run using:
Chris@0 94
Chris@0 95 make check
Chris@0 96
Chris@0 97 4) The final step is to install the library. This step needs to be
Chris@0 98 carried out as the root user (or with sudo):
Chris@0 99
Chris@0 100 make install
Chris@0 101
Chris@0 102 This command will by default install the library in the directory
Chris@0 103 /usr/local/lib. It can in installed in other location by using the
Chris@0 104 --prefix option in step 1).
Chris@0 105
Chris@0 106 5) On linux, one more step is required, the registering of the library
Chris@0 107 with the system. This is done by running the following command
Chris@0 108 (also as the root user):
Chris@0 109
Chris@0 110 ldconfig -v
Chris@0 111
Chris@0 112 As a final test, you can run
Chris@0 113
Chris@0 114 sndfile-resample
Chris@0 115
Chris@0 116 to make sure everything is installed correctly.
Chris@0 117