Imported Upstream version 0.19.1
[platform/upstream/p11-kit.git] / doc / manual / html / devel-building.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Compiling p11-kit from Source</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="p11-kit">
8 <link rel="up" href="devel.html" title="Building, Packaging, and Contributing to p11-kit">
9 <link rel="prev" href="devel-commands.html" title="Customizing installed commands">
10 <link rel="next" href="devel-building-style.html" title="Coding Style">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
16 <td><a accesskey="p" href="devel-commands.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
17 <td><a accesskey="u" href="devel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
18 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
19 <th width="100%" align="center">p11-kit</th>
20 <td><a accesskey="n" href="devel-building-style.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
21 </tr></table>
22 <div class="section">
23 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
24 <a name="devel-building"></a>Compiling p11-kit from Source</h2></div></div></div>
25 <p>This describes how to compiling the p11-kit package from
26                 source code. This is normally only necessary for those wishing to
27                 contribute to the project or package p11-kit.</p>
28 <p>You can download
29                 <a class="ulink" href="http://p11-glue.freedesktop.org/releases/" target="_top">tarballs
30                 of the releases</a> of p11-kit or
31                 <a class="ulink" href="http://cgit.freedesktop.org/p11-glue/p11-kit/" target="_top">check
32                 out the source code from git</a>. This documentation will not
33                 go into all the details of how to get your development environment
34                 set up and instead focus on the what's unique to compiling p11-kit.</p>
35 <div class="section">
36 <div class="titlepage"><div><div><h3 class="title">
37 <a name="devel-building-unix"></a>Building on UNIX</h3></div></div></div>
38 <p>p11-kit uses the standard GNU build system, using autoconf for package
39                         configuration and resolving portability issues, automake for building makefiles
40                         that comply with the GNU Coding Standards, and libtool for building shared
41                         libraries on multiple platforms. The normal sequence for compiling and
42                         installing the p11-kit library is thus:</p>
43 <pre class="programlisting">
44 $ ./configure --prefix=/path/to/prefix ...
45 $ make
46 $ make install
47 </pre>
48 <p>If you've checked out the source code from git, then the
49                         <span class="command"><strong>configure</strong></span> script does not yet exist. So use
50                         the following instead:</p>
51 <pre class="programlisting">
52 $ ./autogen.sh --prefix=/path/to/prefix ...
53 $ make
54 $ make install
55 </pre>
56 <p>The standard options provided by GNU autoconf may be passed to the configure
57                         script. Please see the autoconf documentation or run <code class="literal">./configure --help</code>
58                         for information about the standard options. In particular you probably want to adjust
59                         the <code class="literal">--prefix=/xxx</code> argument depending on your system and development
60                         environment.</p>
61 </div>
62 <div class="section">
63 <div class="titlepage"><div><div><h3 class="title">
64 <a name="devel-building-dependencies"></a>Optional Dependencies</h3></div></div></div>
65 <p>On a modern GNU Linux system, p11-kit has no required dependencies other
66                         than the standard C library. However on older UNIX systems, some of the following
67                         may be required.</p>
68 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
69 <li class="listitem"><p><span class="command"><strong>gettext</strong></span> is required if your system doesn't
70                                 have the <code class="literal">gettext()</code> functionality for handling message
71                                 translation databases. This can be provided by the libintl library from
72                                 the <a class="ulink" href="http://www.gnu.org/software/gettext" target="_top">GNU gettext
73                                 package</a>.</p></li>
74 <li class="listitem"><p><span class="command"><strong>pthread</strong></span> is required if your (ancient) system
75                                 doesn't have this included in the base system. How this is provided is platform
76                                 specific.</p></li>
77 </ul></div>
78 <p>In addition p11-kit has several optional dependencies. If these are not available
79                         during the build, then certain features will be disabled.</p>
80 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
81 <li class="listitem"><p><span class="command"><strong>libffi1</strong></span> for shoring of PKCS#11 modules
82                                 between multiple callers in the same process. It is highly recommended that
83                                 this dependency be treated as a required dependency.</p></li>
84 <li class="listitem"><p><span class="command"><strong>gtk-doc</strong></span> is required to build the reference
85                                 manual. Use <code class="literal">--enable-doc</code> to control this
86                                 dependency.</p></li>
87 <li class="listitem"><p><span class="command"><strong>xsltproc</strong></span> is required to build the command
88                                 manual pages. Use <code class="literal">--enable-doc</code> to control this
89                                 dependency.</p></li>
90 <li class="listitem"><p><span class="command"><strong>libtasn1</strong></span> is required to build the trust
91                                 module and code that interacts with certificates.</p></li>
92 </ul></div>
93 </div>
94 <div class="section">
95 <div class="titlepage"><div><div><h3 class="title">
96 <a name="devel-building-configure"></a>Extra Configuration Options</h3></div></div></div>
97 <p>In addition to the normal options, the configure script in the p11-kit library
98                         supports these additional arguments:</p>
99 <div class="variablelist"><table border="0" class="variablelist">
100 <colgroup>
101 <col align="left" valign="top">
102 <col>
103 </colgroup>
104 <tbody>
105 <tr>
106 <td><p><span class="term"><code class="option">--disable-trust-module</code></span></p></td>
107 <td><p>Disables building of the trust policy module.</p></td>
108 </tr>
109 <tr>
110 <td><p><span class="term"><code class="option">--disable-debug</code>, <code class="option">--enable-debug</code></span></p></td>
111 <td><p>By default p11-kit is built with debug symbols assertions and
112                                         and precondition checks. Enabling the debug option configures even more
113                                         detailed debug build, including disabling optimization. Disabling the debug
114                                         option is not recommended, as it disables all assertions, preconditions and
115                                         internal consistency checks, although it may result it a slightly faster
116                                         library.</p></td>
117 </tr>
118 <tr>
119 <td><p><span class="term"><code class="option">--enable-doc</code></span></p></td>
120 <td><p>Enables building of the documentation and command line manual.
121                                         The documentation is built in the <code class="literal">doc/html/</code> directory of
122                                         the build. Requires the <code class="literal">gtk-doc</code> and <code class="literal">xsltproc</code>
123                                         dependencies.</p></td>
124 </tr>
125 <tr>
126 <td><p><span class="term"><code class="option">--enable-strict</code></span></p></td>
127 <td><p>Enables strict checks during building of p11-kit. All
128                                         compiler warnings become errors.</p></td>
129 </tr>
130 <tr>
131 <td><p><span class="term"><code class="option">--with-libtasn1</code>, <code class="option">--without-libtasn1</code></span></p></td>
132 <td><p>Build with a dependency on the libtasn1 library. This dependency
133                                         allows the trust policy module to be built as well as other code that interacts with
134                                         certificates.</p></td>
135 </tr>
136 <tr>
137 <td><p><span class="term"><code class="option">--with-module-path</code></span></p></td>
138 <td><p>Specify the path to look for PKCS#11 modules which were
139                                         listed in a module config file with a relative path.</p></td>
140 </tr>
141 <tr>
142 <td><p><span class="term"><code class="option">--with-trust-paths</code></span></p></td>
143 <td><p>Specify the files or directories to look for certificate
144                                         anchors and blacklists. Multiple files and/or directories are specified with
145                                         a <code class="literal">:</code> in between them. The first path has the highest
146                                         priority when searching for certificates.</p></td>
147 </tr>
148 <tr>
149 <td><p><span class="term"><code class="option">--with-system-config</code></span></p></td>
150 <td><p>Specify the path to look for p11-kit config files. This
151                                         usually defaults to something like <code class="literal">/etc/pkcs11</code></p></td>
152 </tr>
153 </tbody>
154 </table></div>
155 <p></p>
156 </div>
157 </div>
158 <div class="footer">
159 <hr>
160           Generated by GTK-Doc V1.18</div>
161 </body>
162 </html>