annotate src/libsamplerate-0.1.9/INSTALL @ 41:481f5f8c5634

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