1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
Installation instructions
=========================
The Avro library is written in ANSI C. It uses CMake [1] as its build
manager.
[1] https://www.cmake.org/
Prerequisites
-------------
Avro uses CMake [1] as its build manager. You must have this installed,
along with a C compiler (such as gcc) to build the library.
Avro depends on the Jansson JSON parser [2], version 2.3 or higher. On
many operating systems this library is available through your package
manager (for example, `apt-get install libjansson-dev` on Ubuntu/Debian,
and `brew install jansson` on Mac OS). If not, please download and
install it from source [2].
To build the documentation you need asciidoc [3] and source-highlight [4]
installed. The build scripts will automatically detect whether these
tools are installed, and will skip the documentation if they're not.
[1] https://www.cmake.org/
[2] http://www.digip.org/jansson/
[3] https://www.methods.co.nz/asciidoc
[4] https://www.gnu.org/software/src-highlite/
Building from source
--------------------
The Avro C library uses CMake as its build manager. In most cases, you
should be able to build the source code by running the following:
$ mkdir build
$ cd build
$ cmake .. \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
$ make
$ make test
$ make install
You might have to run the last command using sudo, if you need
administrative privileges to write to the $PREFIX directory.
The "RelWithDebInfo" build type will build an optimized copy of the
library, including debugging symbols. Use the "Release" build type if
you don't want debugging symbols. Use the "Debug" build type if you
want a non-optimized library, with debugging symbols.
On Mac OS X, you can build a universal binary by setting the
CMAKE_OSX_ARCHITECTURES option when running cmake. Just add something
like the following:
-DCMAKE_OSX_ARCHITECTURES=i386;x86_64
to the cmake command given above. The set of architectures that you can
choose from differs depending on which version of OS X you're running;
common possibilities include "i386", "x86_64", "ppc", and "ppc64".
On Unix, you can request thread-safe versions of the Avro library's
global functions by defining the THREADSAFE cmake variable. Just add
the following to your cmake invokation:
-DTHREADSAFE=true
|