This file is indexed.

/usr/share/doc/libjansson-dev/html/gettingstarted.html is in libjansson-doc 2.11-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Getting Started &#8212; Jansson 2.11 documentation</title>
    <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2.11',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Upgrading from 1.x" href="upgrading.html" />
    <link rel="prev" title="Jansson Documentation" href="index.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head>
  <body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="getting-started">
<h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
<div class="section" id="compiling-and-installing-jansson">
<h2>Compiling and Installing Jansson<a class="headerlink" href="#compiling-and-installing-jansson" title="Permalink to this headline"></a></h2>
<p>The Jansson source is available at
<a class="reference external" href="http://www.digip.org/jansson/releases/">http://www.digip.org/jansson/releases/</a>.</p>
<div class="section" id="unix-like-systems-including-mingw">
<h3>Unix-like systems (including MinGW)<a class="headerlink" href="#unix-like-systems-including-mingw" title="Permalink to this headline"></a></h3>
<p>Unpack the source tarball and change to the source directory:</p>
<pre class="literal-block">
bunzip2 -c jansson-2.11.tar.bz2 | tar xf -
cd jansson-2.11
</pre>
<p>The source uses GNU Autotools (<a class="reference external" href="http://www.gnu.org/software/autoconf/">autoconf</a>, <a class="reference external" href="http://www.gnu.org/software/automake/">automake</a>, <a class="reference external" href="http://www.gnu.org/software/libtool/">libtool</a>), so
compiling and installing is extremely simple:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="p">.</span><span class="o">/</span><span class="n">configure</span>
<span class="n">make</span>
<span class="n">make</span> <span class="n">check</span>
<span class="n">make</span> <span class="n">install</span>
</pre></div>
</div>
<p>To change the destination directory (<code class="docutils literal"><span class="pre">/usr/local</span></code> by default), use
the <code class="docutils literal"><span class="pre">--prefix=DIR</span></code> argument to <code class="docutils literal"><span class="pre">./configure</span></code>. See <code class="docutils literal"><span class="pre">./configure</span>
<span class="pre">--help</span></code> for the list of all possible configuration options.</p>
<p>The command <code class="docutils literal"><span class="pre">make</span> <span class="pre">check</span></code> runs the test suite distributed with
Jansson. This step is not strictly necessary, but it may find possible
problems that Jansson has on your platform. If any problems are found,
please report them.</p>
<p>If you obtained the source from a Git repository (or any other source
control system), there’s no <code class="docutils literal"><span class="pre">./configure</span></code> script as it’s not kept in
version control. To create the script, the build system needs to be
bootstrapped. There are many ways to do this, but the easiest one is
to use <code class="docutils literal"><span class="pre">autoreconf</span></code>:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">autoreconf</span> <span class="o">-</span><span class="n">fi</span>
</pre></div>
</div>
<p>This command creates the <code class="docutils literal"><span class="pre">./configure</span></code> script, which can then be
used as described above.</p>
</div>
<div class="section" id="cmake-various-platforms-including-windows">
<span id="build-cmake"></span><h3>CMake (various platforms, including Windows)<a class="headerlink" href="#cmake-various-platforms-including-windows" title="Permalink to this headline"></a></h3>
<p>Jansson can be built using <a class="reference external" href="http://www.cmake.org">CMake</a>. Create a build directory for an
out-of-tree build, change to that directory, and run <code class="docutils literal"><span class="pre">cmake</span></code> (or <code class="docutils literal"><span class="pre">ccmake</span></code>,
<code class="docutils literal"><span class="pre">cmake-gui</span></code>, or similar) to configure the project.</p>
<p>See the examples below for more detailed information.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">In the below examples <code class="docutils literal"><span class="pre">..</span></code> is used as an argument for <code class="docutils literal"><span class="pre">cmake</span></code>.
This is simply the path to the jansson project root directory.
In the example it is assumed you’ve created a sub-directory <code class="docutils literal"><span class="pre">build</span></code>
and are using that. You could use any path you want.</p>
</div>
<div class="section" id="unix-make-files">
<span id="build-cmake-unix"></span><h4>Unix (Make files)<a class="headerlink" href="#unix-make-files" title="Permalink to this headline"></a></h4>
<p>Generating make files on unix:</p>
<pre class="literal-block">
bunzip2 -c jansson-2.11.tar.bz2 | tar xf -
cd jansson-2.11

mkdir build
cd build
cmake .. # or ccmake .. for a GUI.
</pre>
<p>Then to build:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">make</span>
<span class="n">make</span> <span class="n">check</span>
<span class="n">make</span> <span class="n">install</span>
</pre></div>
</div>
</div>
<div class="section" id="windows-visual-studio">
<h4>Windows (Visual Studio)<a class="headerlink" href="#windows-visual-studio" title="Permalink to this headline"></a></h4>
<p>Creating Visual Studio project files from the command line:</p>
<pre class="literal-block">
&lt;unpack&gt;
cd jansson-2.11

md build
cd build
cmake -G &quot;Visual Studio 10&quot; ..
</pre>
<p>You will now have a <em>Visual Studio Solution</em> in your build directory.
To run the unit tests build the <code class="docutils literal"><span class="pre">RUN_TESTS</span></code> project.</p>
<p>If you prefer a GUI the <code class="docutils literal"><span class="pre">cmake</span></code> line in the above example can
be replaced with:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">cmake</span><span class="o">-</span><span class="n">gui</span> <span class="p">..</span>
</pre></div>
</div>
<p>For command line help (including a list of available generators)
for <a class="reference external" href="http://www.cmake.org">CMake</a> simply run:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">cmake</span>
</pre></div>
</div>
<p>To list available <a class="reference external" href="http://www.cmake.org">CMake</a> settings (and what they are currently set to)
for the project, run:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">cmake</span> <span class="o">-</span><span class="n">LH</span> <span class="p">..</span>
</pre></div>
</div>
</div>
<div class="section" id="mac-osx-xcode">
<h4>Mac OSX (Xcode)<a class="headerlink" href="#mac-osx-xcode" title="Permalink to this headline"></a></h4>
<p>If you prefer using Xcode instead of make files on OSX,
do the following. (Use the same steps as
for <a class="reference internal" href="#build-cmake-unix"><span class="std std-ref">Unix</span></a>):</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="p">...</span>
<span class="n">cmake</span> <span class="o">-</span><span class="n">G</span> <span class="s">&quot;Xcode&quot;</span> <span class="p">..</span>
</pre></div>
</div>
</div>
<div class="section" id="additional-cmake-settings">
<h4>Additional CMake settings<a class="headerlink" href="#additional-cmake-settings" title="Permalink to this headline"></a></h4>
<div class="section" id="shared-library">
<h5>Shared library<a class="headerlink" href="#shared-library" title="Permalink to this headline"></a></h5>
<p>By default the <a class="reference external" href="http://www.cmake.org">CMake</a> project will generate build files for building the
static library. To build the shared version use:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="p">...</span>
<span class="n">cmake</span> <span class="o">-</span><span class="n">DJANSSON_BUILD_SHARED_LIBS</span><span class="o">=</span><span class="mi">1</span> <span class="p">..</span>
</pre></div>
</div>
</div>
<div class="section" id="changing-install-directory-same-as-autoconf-prefix">
<h5>Changing install directory (same as autoconf –prefix)<a class="headerlink" href="#changing-install-directory-same-as-autoconf-prefix" title="Permalink to this headline"></a></h5>
<p>Just as with the <a class="reference external" href="http://www.gnu.org/software/autoconf/">autoconf</a> project you can change the destination directory
for <code class="docutils literal"><span class="pre">make</span> <span class="pre">install</span></code>. The equivalent for autoconfs <code class="docutils literal"><span class="pre">./configure</span> <span class="pre">--prefix</span></code>
in <a class="reference external" href="http://www.cmake.org">CMake</a> is:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="p">...</span>
<span class="n">cmake</span> <span class="o">-</span><span class="nl">DCMAKE_INSTALL_PREFIX</span><span class="p">:</span><span class="n">PATH</span><span class="o">=/</span><span class="n">some</span><span class="o">/</span><span class="n">other</span><span class="o">/</span><span class="n">path</span> <span class="p">..</span>
<span class="n">make</span> <span class="n">install</span>
</pre></div>
</div>
</div>
</div>
</div>
<div class="section" id="android">
<h3>Android<a class="headerlink" href="#android" title="Permalink to this headline"></a></h3>
<p>Jansson can be built for Android platforms. Android.mk is in the
source root directory. The configuration header file is located in the
<code class="docutils literal"><span class="pre">android</span></code> directory in the source distribution.</p>
</div>
<div class="section" id="other-systems">
<h3>Other Systems<a class="headerlink" href="#other-systems" title="Permalink to this headline"></a></h3>
<p>On non Unix-like systems, you may be unable to run the <code class="docutils literal"><span class="pre">./configure</span></code>
script. In this case, follow these steps. All the files mentioned can
be found in the <code class="docutils literal"><span class="pre">src/</span></code> directory.</p>
<ol class="arabic simple">
<li>Create <code class="docutils literal"><span class="pre">jansson_config.h</span></code> (which has some platform-specific
parameters that are normally filled in by the <code class="docutils literal"><span class="pre">./configure</span></code>
script). Edit <code class="docutils literal"><span class="pre">jansson_config.h.in</span></code>, replacing all <code class="docutils literal"><span class="pre">&#64;variable&#64;</span></code>
placeholders, and rename the file to <code class="docutils literal"><span class="pre">jansson_config.h</span></code>.</li>
<li>Make <code class="docutils literal"><span class="pre">jansson.h</span></code> and <code class="docutils literal"><span class="pre">jansson_config.h</span></code> available to the
compiler, so that they can be found when compiling programs that
use Jansson.</li>
<li>Compile all the <code class="docutils literal"><span class="pre">.c</span></code> files (in the <code class="docutils literal"><span class="pre">src/</span></code> directory) into a
library file. Make the library available to the compiler, as in
step 2.</li>
</ol>
</div>
<div class="section" id="building-the-documentation">
<h3>Building the Documentation<a class="headerlink" href="#building-the-documentation" title="Permalink to this headline"></a></h3>
<p>(This subsection describes how to build the HTML documentation you are
currently reading, so it can be safely skipped.)</p>
<p>Documentation is in the <code class="docutils literal"><span class="pre">doc/</span></code> subdirectory. It’s written in
<a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> with <a class="reference external" href="http://sphinx.pocoo.org/">Sphinx</a> annotations. To generate the HTML
documentation, invoke:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">html</span>
</pre></div>
</div>
<p>and point your browser to <code class="docutils literal"><span class="pre">doc/_build/html/index.html</span></code>. <a class="reference external" href="http://sphinx.pocoo.org/">Sphinx</a> 1.0
or newer is required to generate the documentation.</p>
</div>
</div>
<div class="section" id="compiling-programs-that-use-jansson">
<h2>Compiling Programs that Use Jansson<a class="headerlink" href="#compiling-programs-that-use-jansson" title="Permalink to this headline"></a></h2>
<p>Jansson involves one C header file, <code class="file docutils literal"><span class="pre">jansson.h</span></code>, so it’s enough
to put the line</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="cp">#include</span> <span class="cpf">&lt;jansson.h&gt;</span><span class="cp"></span>
</pre></div>
</div>
<p>in the beginning of every source file that uses Jansson.</p>
<p>There’s also just one library to link with, <code class="docutils literal"><span class="pre">libjansson</span></code>. Compile and
link the program as follows:</p>
<div class="highlight-c"><div class="highlight"><pre><span></span><span class="n">cc</span> <span class="o">-</span><span class="n">o</span> <span class="n">prog</span> <span class="n">prog</span><span class="p">.</span><span class="n">c</span> <span class="o">-</span><span class="n">ljansson</span>
</pre></div>
</div>
<p>Starting from version 1.2, there’s also support for <a class="reference external" href="http://pkg-config.freedesktop.org/">pkg-config</a>:</p>
<div class="highlight-shell"><div class="highlight"><pre><span></span>cc -o prog prog.c <span class="sb">`</span>pkg-config --cflags --libs jansson<span class="sb">`</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Getting Started</a><ul>
<li><a class="reference internal" href="#compiling-and-installing-jansson">Compiling and Installing Jansson</a><ul>
<li><a class="reference internal" href="#unix-like-systems-including-mingw">Unix-like systems (including MinGW)</a></li>
<li><a class="reference internal" href="#cmake-various-platforms-including-windows">CMake (various platforms, including Windows)</a><ul>
<li><a class="reference internal" href="#unix-make-files">Unix (Make files)</a></li>
<li><a class="reference internal" href="#windows-visual-studio">Windows (Visual Studio)</a></li>
<li><a class="reference internal" href="#mac-osx-xcode">Mac OSX (Xcode)</a></li>
<li><a class="reference internal" href="#additional-cmake-settings">Additional CMake settings</a><ul>
<li><a class="reference internal" href="#shared-library">Shared library</a></li>
<li><a class="reference internal" href="#changing-install-directory-same-as-autoconf-prefix">Changing install directory (same as autoconf –prefix)</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#android">Android</a></li>
<li><a class="reference internal" href="#other-systems">Other Systems</a></li>
<li><a class="reference internal" href="#building-the-documentation">Building the Documentation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#compiling-programs-that-use-jansson">Compiling Programs that Use Jansson</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="index.html" title="previous chapter">Jansson Documentation</a></li>
      <li>Next: <a href="upgrading.html" title="next chapter">Upgrading from 1.x</a></li>
  </ul></li>
</ul>
</div>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/gettingstarted.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2009-2018, Petri Lehtinen.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.6</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
      
      |
      <a href="_sources/gettingstarted.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>