OSDN Git Service

ucm: find_exec() - fix memory leak (dir)
[android-x86/external-alsa-lib.git] / INSTALL
1
2                         ALSA library installation
3                         =========================
4
5 Installation from tarball
6 -------------------------
7
8 For installation you can use these commands:
9
10         ./configure
11         make install
12
13
14 Compilation from Git-sources
15 ---------------------------
16
17 Requirements:
18         * automake
19         * libtool
20
21 To compile alsa-lib from source:
22
23         ./gitcompile
24
25 If you do not want to use the supplied gitcompile-script, you can
26 compile alsa-lib manually by using these steps:
27
28         libtoolize --force --copy --automake
29         aclocal
30         autoheader
31         automake --foreign --copy --add-missing
32         autoconf
33         ./configure
34         make
35
36
37 Note: Some automake packages have missing aclocal program. Use newer version
38       in the case.
39
40
41 Compilation of static library
42 -----------------------------
43
44 If you would like to use the static ALSA library, you need to use these
45 options for the configure script:
46
47         ./configure --enable-shared=no --enable-static=yes
48
49 Unfortunately, due to bug in the libtool script, the shared and static
50 library cannot be built together.
51
52
53 Partial Builds
54 --------------
55
56 You can choose the core components to build via --enable-* or --disable-*
57 configure option for reducing the size of libasound.  The selectable
58 components are: pcm, mixer, rawmidi, hwdep, seq and instr.
59 For example, --disable-rawmidi will prevent to build the stuff related
60 with raw MIDI.  As default, all components are enabled.
61
62 The PCM plugins to build can be selected via --with-pcm-plugins
63 configure option.  Multiple plugins can be passed by separation with
64 comma.  For example, to select _only_ rate and linear plugins (and
65 disable other plugins), pass
66         --with-pcm-plugins=rate,linear
67 Note that "hw" plugin is always enabled.
68 Passing "all" will select all available plugins (which is the default
69 behavior).
70
71 When you select "plug" plugin, copy and linear plugins will be
72 automatically selected, too.  That is, the linear-format and
73 access-type conversions are always available with plug layer.
74 The other conversions of plug (channel shrink/expansion, rate,
75 non-linear and float conversions) are enabled when the corresponding
76 plugin is selected, too.
77
78
79 Configuration for cross-compilation
80 -----------------------------------
81
82 When you would like to cross-compile ALSA library (e.g. compile on
83 i686 host but for arm architecture) you will need to call ./configure
84 script with additional parameters:
85
86 CC=arm-linux-gcc ./configure --host=arm-linux
87
88 You can omit setting 'CC' variable and cross-compiler will be guessed too.
89
90 So simplest version would be:
91
92 ./configure --host=arm-linux
93
94 For platform names in the form cpu-vendor-os (or aliases for this)
95 you should look in 'config.guess' script. Target and all paths
96 used here are only examples and should not be directly applicable to
97 your system.
98
99 Configuration for machines without FPU
100 --------------------------------------
101
102 If your machine does not have FP unit, you should use '--with-softfloat'
103 option. This option disables usage of float numbers in PCM route plugin.
104 ALSA could then leave much more CPU cycles for your applications, but you 
105 could still need some floating point emulator.
106
107 Thread-safety option
108 --------------------
109
110 As default, major PCM functions of alsa-lib are built to be
111 thread-safe with pthread mutex (while this wasn't present in the
112 versions earlier than 1.1.2).  If you want to build without this
113 thread-safety support but reduce the overhead, pass
114 --disable-thread-safety configure option.
115
116 Jack plugin
117 -----------
118
119 JACK plugin is moved to alsa-plugins package.
120
121 Trouble Shooting
122 ----------------
123
124 * Install path on Fedora Core 3
125
126   FC3 installs its system ALSA library to /lib instead of /usr/lib.
127   Specify --libdir=/lib to configure to overwrite it with the new library,
128   or run like
129
130         # ln -sf /usr/lib/libasound.so.2.0.0 /lib/libasound.so.2.0.0
131
132   to make symlink to the new path.
133   Note that /lib might be /lib64 on 64bit architecture.