Merge branch '1.2'
[jansson.git] / doc / gettingstarted.rst
index 1181588..34d2ab9 100644 (file)
@@ -7,11 +7,8 @@ Getting Started
 Compiling and Installing Jansson
 ================================
 
-This chapter explains how to compile and install the library itself.
-
-
-Compiling and Installing from a Source Tarball
-----------------------------------------------
+The Jansson source is available at
+http://www.digip.org/jansson/releases/.
 
 Unpack the source tarball and change to the source directory:
 
@@ -38,14 +35,6 @@ 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.
 
-.. _autoconf: http://www.gnu.org/software/autoconf/
-.. _automake: http://www.gnu.org/software/automake/
-.. _libtool: http://www.gnu.org/software/libtool/
-
-
-Compiling and Installing from Git
----------------------------------
-
 If you obtained the source from a Git repository (or any other source
 control system), there's no ``./configure`` script as it's not kept in
 version control. To create the script, Autotools needs to be
@@ -55,26 +44,48 @@ to use ``autoreconf``::
     autoreconf -vi
 
 This command creates the ``./configure`` script, which can then be
-used as described in the previous section.
+used as described above.
+
+.. _autoconf: http://www.gnu.org/software/autoconf/
+.. _automake: http://www.gnu.org/software/automake/
+.. _libtool: http://www.gnu.org/software/libtool/
 
 
 Installing Prebuilt Binary Packages
 -----------------------------------
 
-Binary ``.deb`` packages for Ubuntu are available in the `Jansson
-PPA`_ at Launchpad_. Follow the instructions in the PPA ("Read about
-installing" link) to take the PPA into use. Then install the -dev
+Binary ``.deb`` packages for Ubuntu are available in `this PPA`_ at
+Launchpad_. Follow the instructions in the PPA ("Technical details
+about this PPA" link) to take the PPA into use. Then install the -dev
 package::
 
-  apt-get install libjansson-dev
+  sudo apt-get install libjansson-dev
 
-.. _Jansson PPA: http://launchpad.net/~petri/+archive/ppa
+.. _this PPA: http://launchpad.net/~petri/+archive/ppa
 .. _Launchpad: http://launchpad.net/
 
 
+Building the Documentation
+--------------------------
 
-Compiling Programs Using Jansson
-================================
+(This subsection describes how to build the HTML documentation you are
+currently reading, so it can be safely skipped.)
+
+Documentation is in the ``doc/`` subdirectory. It's written in
+reStructuredText_ with Sphinx_ annotations. To generate the HTML
+documentation, invoke::
+
+   make html
+
+and point your browser to ``doc/_build/html/index.html``. Sphinx_ is
+required to generate the documentation.
+
+.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _Sphinx: http://sphinx.pocoo.org/
+
+
+Compiling Programs That Use Jansson
+===================================
 
 Jansson involves one C header file, :file:`jansson.h`, so it's enough
 to put the line
@@ -89,3 +100,9 @@ There's also just one library to link with, ``libjansson``. Compile and
 link the program as follows::
 
     cc -o prog prog.c -ljansson
+
+Starting from version 1.2, there's also support for pkg-config_::
+
+    cc -o prog prog.c `pkg-config --cflags --libs jansson`
+
+.. _pkg-config: http://pkg-config.freedesktop.org/