aboutsummaryrefslogtreecommitdiff
path: root/docs/reference/build-howto.xml
blob: e0922a1e6d8e7f732a9ff5f73a00c515741d04b7 (plain)
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
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libplanfahr-build-howto">
<refmeta>
<refentrytitle>Compiling with libplanfahr</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBPLANFAHR Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Compiling with libplanfahr</refname><refpurpose>Notes on compiling</refpurpose>
</refnamediv>

<refsect2>
<title>Using pkg-config</title>

<para>
Like other GNOME libraries, <application>libplanfahr</application> uses
<application>pkg-config</application> to provide compiler options. The
package name is "<literal>libplanfahr-0.0</literal>". So in your
<literal>configure</literal> script, you might specify something like:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBPLANFAHR, [libplanfahr-0.0])
AC_SUBST(LIBPLANFAHR_CFLAGS)
AC_SUBST(LIBPLANFAHR_LIBS)
</programlisting></informalexample>

<para>
The "<literal>0.0</literal>" in the package name is the "API version"
(indicating "the version of the <application>libplanfahr</application> API
that first appeared in version 0.0") and is essentially just part of
the package name.
</para>

</refsect2>

<refsect2>
<title>Headers</title>

<para>
Code using <application>libplanfahr</application> should do:
</para>

<informalexample><programlisting>
#include &lt;libplanfahr/planfahr.h&gt;
</programlisting></informalexample>

<para>
Including individual headers rather than <literal>planfahr.h</literal> is not
recommended.
</para>

</refsect2>

</refentry>