1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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>
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>
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>
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 ...
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 ...
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
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
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
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
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
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
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>
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">
101 <col align="left" valign="top">
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>
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
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>
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>
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>
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>
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>
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>
160 Generated by GTK-Doc V1.18</div>