Initial commit to Gerrit
[profile/ivi/orc.git] / doc / building.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3                "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % version-entities SYSTEM "version.entities">
5 %version-entities;
6 <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
7 ]>
8 <refentry id="orc-building" revision="29 may 2009">
9 <refmeta>
10 <refentrytitle>Building Orc and Applications That Use Orc</refentrytitle>
11 <manvolnum>3</manvolnum>
12 <refmiscinfo>Orc</refmiscinfo>
13 </refmeta>
14
15 <refnamediv>
16 <refname>Building Orc and Applications that use Orc</refname>
17 <refpurpose>
18 How to build Orc and applications using it.
19 </refpurpose>
20 </refnamediv>
21
22 <refsect1>
23 <title>Building Orc on UNIX</title>
24
25   <!-- this has been borrowed from the glib docs via gstreamer -->
26   <para>
27     On UNIX, Orc uses the standard GNU build system,
28     using <application>autoconf</application> for package
29     configuration and resolving portability issues,
30     <application>automake</application> for building makefiles
31     that comply with the GNU Coding Standards, and
32     <application>libtool</application> for building shared
33     libraries on multiple platforms.  The normal sequence for
34     compiling and installing the Orc library is thus:
35
36     <literallayout>
37       <userinput>./configure</userinput>
38       <userinput>make</userinput>
39       <userinput>make install</userinput>
40     </literallayout>
41   </para>
42
43   <para>
44     The standard options provided by <application>GNU
45     autoconf</application> may be passed to the
46     <command>configure</command> script.  Please see the
47     <application>autoconf</application> documentation or run
48     <command>./configure --help</command> for information about
49     the standard options.
50   </para>
51
52   <para>
53     By default, code generators for all targets are built into the
54     library.  Embedded system developers may wish to use the
55     --enable-backed option, which will disable all other code
56     generators, saving about 200 kB in binary size.  Outside of
57     embedded systems, using --enable-backend is not recommended.
58   </para>
59
60 </refsect1>
61
62 <refsect1>
63 <title>Building Orc Applications</title>
64
65 <para>
66 Applications and libraries can use <command>pkg-config</command> to get all the
67 needed compiler and linker flags to build against Orc.  The following
68 commands will provide the necessary compiler and linker flags:
69
70 <literallayout>
71   <userinput>pkg-config --cflags orc-&ORC_MAJORMINOR;</userinput>
72   <userinput>pkg-config --libs orc-&ORC_MAJORMINOR;</userinput>
73 </literallayout>
74 </para>
75
76 <para>
77 When compiling from source, the default installation directory is not
78 in the default path for the <command>pkg-config</command>, so you may
79 need to set the PKG_CONFIG_DIR environment variable.
80 </para>
81
82 </refsect1>
83
84 </refentry>