-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.install
86 lines (53 loc) · 2.12 KB
/
README.install
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Obtaining the sources
=====================
Source tarballs for resolv_wrapper can be downloaded from
https://ftp.samba.org/pub/cwrap/
The source code repository for socket wrapper is located under
git://git.samba.org/resolv_wrapper.git
To create a local copy, run
$ git clone git://git.samba.org/resolv_wrapper.git
$ cd resolv_wrapper
Building from sources
=====================
resolv_wrapper uses cmake (www.cmake.org) as its build system.
In an unpacked sources base directory, create a directory to
contain the build results, e.g.
$ mkdir obj
$ cd obj
Note that "obj" is just an example. The directory can
be named arbitrarily.
Next, run cmake to configure the build, e.g.
$ cmake -DCMAKE_INSTALL_PREFIX=<prefix> ..
or on a 64 bit red hat system:
$ cmake -DCMAKE_INSTALL_PREFIX=<prefix> -DLIB_SUFFIX=64 ..
The "<prefix>" should be replaced by the intended installation
target prefix directory, typically /usr or /usr/local.
Note that the target directory does not have to be a direct
or indirect subdirectory of the source base directory: It can
be an arbitrary directory in the system. In the general case,
".." has to be replaced by a relative or absolute path of the
source base directory in the "cmake" command line.
One can control the build type with "-DCMAKE_BUILD_TYPE=<mode>"
where <mode> can be one of Debug, Release, RelWithDebInfo, and
some more (see cmake.org). The default is "RelWithDebInfo".
After configuring with cmake, run the build with
$ make
Unit testing
============
In order to support running the test suite after building,
the cmocka unit test framework needs to be installed (cmocka.org),
and you need to specify
-DUNIT_TESTING=ON
in the cmake run.
Note that for unit testing, resolv_wrapper requires socket_wrapper
to be installed. If socket_wrapper is installed in a non-standard
location, this can be passed to cmake via
-Dsocket_wrapper_DIR=<swrap_prefix>/<LIB_SUFFIX>/cmake/socket_wrapper
After running "make",
$ make test
runs the test suite.
Installing
==========
resolv_wrapper is installed into the prefix directory
after running "cmake" and "make" with
$ make install