source: doc/requirements.rst @ 71bc8b0

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampleryinfft+
Last change on this file since 71bc8b0 was 9682d9d, checked in by Paul Brossier <piem@piem.org>, 8 years ago

doc/requirements.rst: add a note about --notests (closes #77)

  • Property mode set to 100644
File size: 7.2 KB
RevLine 
[5069da3]1.. _requirements:
2
[e15d7d0]3Build options
4=============
5
6If built without any external dependencies aubio can be somewhat useful, for
7instance to read, process, and write simple wav files.
8
9To support more media input formas add more features to aubio, you can use one
10or all of the `following libraries <extlibs>`_.
11
12You may also want to know more about the `other options`_ and the `platform
13notes`_
14
15The configure script will automatically for these extra libraries. To make sure
16the library or feature is used, pass the `--enable-flag` to waf. To disable
17this feature, use `--disable-feature`.
18
19To find out more about the build commands, use the `--verbose` option.
[5069da3]20
[e15d7d0]21External libraries
22------------------
23
24External libraries are checked for using ``pkg-config``. Set the
25``PKG_CONFIG_PATH`` environment variable if you have them installed in an
26unusual location.
27
28
29.. note::
30
31    If ``pkg-config`` is not found in ``PATH``, the configure step will
32    succeed, but none of the external libraries will be used.
33
34libav
35.....
36
37  `libav.org <https://libav.org/>`_, open source audio and video processing
38  tools.
39
40If all of the following libraries are found, they will be used to compile
41``aubio_source_avcodec``. so that ``aubio_source`` will be able to decode audio
42from all formats supported by `libav
43<https://libav.org/documentation/general.html#Audio-Codecs>`_.
44
45* libavcodec
46* libavformat
47* libavutil
48* libavresample
49
50To enable this option, configure with ``--enable-avcodec``. The build will then
51failed if the required libraries are not found. To disable this option,
52configure with ``--disable-avcodec``
53
54
55libsndfile
56..........
57
58  `libsndfile <http://www.mega-nerd.com/libsndfile/>`_, a C library for reading
59  and writing sampled sound files.
60
61With libsndfile built in, ``aubio_source_sndfile`` will be built in and used by
62``aubio_source``.
63
64To enable this option, configure with ``--enable-sndfile``. The build will then
65fail if the required library is not found. To disable this option, configure
66with ``--disable-sndfile``
67
68libsamplerate
69.............
70
71  `libsamplerate <http://www.mega-nerd.com/SRC/>`_, a sample rate converter for
72  audio.
73
74With libsamplerate built in, ``aubio_source_sndfile`` will support resampling,
75and ``aubio_resample`` will be fully functional.
76
77To enable this option, configure with ``--enable-samplerate``. The build will
78then fail if the required library is not found. To disable this option,
79configure with ``--disable-samplerate``
80
81libfftw3
82........
83
84  `FFTW <http://fftw.org/>`_, a C subroutine for computing the discrete Fourier
85  transform
86
87With libfftw3 built in, ``aubio_fft`` will use `FFTW`_ to
88compute Fast Fourier Transform (FFT), allowing aubio to compute FFT on length
89that are not a power of 2.
90
91To enable this option, configure with ``--enable-fftw3``. The build will
92then fail if the required library is not found. To disable this option,
93configure with ``--disable-fftw3``
[5069da3]94
95Platform notes
96--------------
97
[a9a1e79]98On all platforms, you will need to have installed:
99
100 - a compiler (gcc, clang, msvc, ...)
101 - python (any version >= 2.7, including 3.x)
102 - a terminal to run command lines in
103
[5069da3]104Linux
105.....
106
107The following `External libraries`_ will be used if found: `libav`_,
108`libsamplerate`_, `libsndfile`_, `libfftw3`_.
109
110macOS
111.....
112
113The following system frameworks will be used on Mac OS X systems:
114
115  - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute
116    FFTs and other vectorized operations optimally.
117
118  - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and
119    `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to
120    decode audio from files and network streams.
121
122.. note::
123
124  To build a fat binary for both ``i386`` and ``x86_64``, use ``./waf configure
125  --enable-fat``.
126
127The following `External libraries`_ will also be checked: `libav`_,
128`libsamplerate`_, `libsndfile`_, `libfftw3`_.
129
[e15d7d0]130To build a fat binary on a darwin like system (macOS, tvOS, appleOS, ...)
131platforms, configure with ``--enable-fat``.
132
[5069da3]133Windows
134.......
135
[7b3668c]136To use a specific version of the compiler, ``--msvc_version``. To build for a
137specific architecture, use ``--msvc_target``. For instance, to build aubio
138for ``x86`` using ``msvc 12.0``, use:
139
140.. code:: bash
141
142    waf configure --msvc_version='msvc 12.0' --msvc_target='x86'
143
144
[5069da3]145The following `External libraries`_ will be used if found: `libav`_,
146`libsamplerate`_, `libsndfile`_, `libfftw3`_.
147
148iOS
149...
150
151The following system frameworks will be used on iOS and iOS Simulator.
152
153  - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute
154    FFTs and other vectorized operations optimally.
155
156  - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and
157    `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to
158    decode audio from files and network streams.
159
160To build aubio for iOS, configure with ``--with-target-platform=ios``. For the
161iOS Simulator, use ``--with-target-platform=iosimulator`` instead.
162
163By default, aubio is built with the following flags on iOS:
164
165.. code:: bash
166
167    CFLAGS="-fembed-bitcode -arch arm64 -arch armv7 -arch armv7s -miphoneos-version-min=6.1"
168
169and on iOS Simulator:
170
171.. code::
172
[6f29fe3]173    CFLAGS="-arch i386 -arch x86_64 -mios-simulator-version-min=6.1"
[5069da3]174
175Set ``CFLAGS`` and ``LINKFLAGS`` to change these default values, or edit
176``wscript`` directly.
177
[e15d7d0]178Other options
[5069da3]179-------------
180
[a9a1e79]181Some additional options can be passed to the configure step. For the complete
182list of options, run:
183
[385a9c1e]184.. code:: bash
185
[e15d7d0]186    $ ./waf --help
187
188Here is an example of a custom command:
189
190.. code:: bash
191
192    $ ./waf --verbose configure build install \
193                --enable-avcodec --enable-wavread --disable-wavwrite \
194                --enable-sndfile --enable-samplerate --enable-docs \
195                --destdir $PWD/build/destdir --testcmd="echo %s" \
196                --prefix=/opt --libdir=/opt/lib/multiarch \
197                --manpagesdir=/opt/share/man  \
198                uninstall clean distclean dist distcheck
[5069da3]199
200Double precision
201................
202
203To compile aubio in double precision mode, configure with ``--enable-double``.
204
205To compile aubio in single precision mode, use ``--disable-double`` (default).
206
[9682d9d]207Disabling the tests
208...................
209
210In some case, for instance when cross-compiling, unit tests should not be run.
211Option ``--notests`` can be used for this purpose. The tests will not be
212executed, but the binaries will be compiled, ensuring that linking against
213libaubio works as expected.
214
215.. note::
216
217  The ``--notests`` option should be passed to both ``build`` and ``install``
218  targets, otherwise waf will try to run them.
219
[e15d7d0]220Edit wscript
221............
[5069da3]222
[e15d7d0]223Many of the options are gathered in the file `wscript`. a good starting point
224when looking for additional options.
[5069da3]225
[e15d7d0]226.. _build_docs:
[5069da3]227
[e15d7d0]228Building the docs
229-----------------
[5069da3]230
[e15d7d0]231If the following command line tools are found, the documentation will be built
232built:
[5069da3]233
[7a8a07e]234 - `doxygen <http://doxygen.org>`_ to build the :ref:`doxygen-documentation`.
[5069da3]235 - `txt2man <https://github.com/mvertes/txt2man>`_ to build the :ref:`manpages`
[e15d7d0]236 - `sphinx <http://sphinx-doc.org>`_ to build this document
[5069da3]237
238These tools are searched for in the current ``PATH`` environment variable.
239By default, the documentation is built only if the tools are found.
240
241To disable the documentation, configure with ``--disable-docs``. To build with
242the documentation, configure with ``--enable-docs``.
Note: See TracBrowser for help on using the repository browser.