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