]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/building.sgml
8cb24d6d4912c436e984f0776108f05beae11b35
[~andy/gtk] / docs / reference / gtk / building.sgml
1 <refentry id="gtk-building" revision="6 Sept 2001">
2 <refmeta>
3 <refentrytitle>Compiling the GTK+ package</refentrytitle>
4 <manvolnum>3</manvolnum>
5 <refmiscinfo>GTK Library</refmiscinfo>
6 </refmeta>
7
8 <refnamediv>
9 <refname>Compiling the GTK+ Package</refname>
10 <refpurpose>
11 How to compile GTK+ itself
12 </refpurpose>
13 </refnamediv>
14
15     <refsect1 id="building">
16       <title>Building the Library on UNIX</title>
17       <para>
18         On UNIX, GTK+ uses the standard GNU build system,
19         using <application>autoconf</application> for package
20         configuration and resolving portability issues,
21         <application>automake</application> for building makefiles
22         that comply with the GNU Coding Standards, and
23         <application>libtool</application> for building shared
24         libraries on multiple platforms.  The normal sequence for
25         compiling and installing the GTK+ library is thus:
26
27         <literallayout>
28           <userinput>./configure</userinput>
29           <userinput>make</userinput>
30           <userinput>make install</userinput>
31         </literallayout>
32       </para>
33
34       <para>
35         The standard options provided by <application>GNU
36         autoconf</application> may be passed to the
37         <command>configure</command> script.  Please see the
38         <application>autoconf</application> documentation or run
39         <command>./configure --help</command> for information about
40         the standard options.
41       </para>
42     </refsect1>
43
44     <refsect1 id="extra-configuration-options">
45       <title>Extra Configuration Options</title>
46
47       <para>
48         In addition to the normal options, the
49         <command>configure</command> script in the GTK+
50         library supports these additional arguments:
51
52         <cmdsynopsis>
53           <command>configure</command>
54
55           <group>
56             <arg>--disable-modules</arg>
57             <arg>--enable-modules</arg>
58           </group>
59           <group>
60             <arg>--with-included-loaders==LOADER1,LOADER2,...</arg>
61           </group>
62           <group>
63             <arg>--enable-debug=[no|minimum|yes]</arg>
64           </group>
65           <group>
66             <arg>--disable-shm</arg>
67             <arg>--enable-shm</arg>
68           </group>
69           <group>
70             <arg>--disable-xim</arg>
71             <arg>--enable-xim</arg>
72           </group>
73           <group>
74             <arg>--disable-xim-inst</arg>
75             <arg>--enable-xim-inst</arg>
76           </group>
77           <group>
78             <arg>--disable-xkb</arg>
79             <arg>--enable-xkb</arg>
80           </group>
81           <group>
82             <arg>--disable-gtk-doc</arg>
83             <arg>--enable-gtk-doc</arg>
84           </group>
85           <group>
86             <arg>--with-xinput=[no|gxi|xfree]</arg>
87           </group>
88           <group>
89             <arg>--with-gdktarget=[x11|linux-fb|win32]</arg>
90           </group>
91           <group>
92             <arg>--disable-shadowfb</arg>
93             <arg>--enable-shadowfb</arg>
94           </group>
95         </cmdsynopsis>
96       </para>
97
98       <formalpara>
99         <title><systemitem>--disable-modules</systemitem> and
100           <systemitem>--enable-modules</systemitem></title>
101
102         <para>
103           Normally GTK+ will try to build the GdkPixbuf image file
104           format loaders as little shared libraries that are loaded on
105           demand.  The <systemitem>--disable-modules</systemitem>
106           argument indicates that they should all be built statically
107           into the GTK+ library instead.  This is useful for
108           people who need to produce statically-linked binaries.  If
109           neither <systemitem>--disable-modules</systemitem> nor
110           <systemitem>--enable-modules</systemitem> is specified, then
111           the <command>configure</command> script will try to
112           auto-detect whether shared modules work on your system.
113         </para>
114       </formalpara>
115
116       <formalpara>
117         <title><systemitem>--with-included-loaders</systemitem></title>
118
119         <para>
120          This option allows you to specify which image loaders you
121          want to include; for example, you might include only the PNG
122          loader to create a smaller GdkPixbuf binary.
123         </para>
124       </formalpara>
125
126       <formalpara>
127         <title><systemitem>--enable-debug</systemitem></title>
128           
129         <para>
130          Turns on various amounts of debugging support. Setting this to 'no' 
131          disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and
132          all cast checks between different object types. Setting it to 'minimum'
133          disables only cast checks. Setting it to 'yes' enables 
134          <link linkend="GTK-Debug-Options">runtime debugging</link>. 
135          The default is 'minimum'.
136          Note that 'no' is fast, but dangerous as it tends to destabilize 
137          even mostly bug-free software by changing the effect of many bugs 
138          from simple warnings into fatal crashes. Thus 
139          <option>--enable-debug=no</option> should <emphasis>not</emphasis> 
140          be used for stable releases of gtk+.
141         </para>
142       </formalpara>
143
144       <formalpara>
145         <title><systemitem>--disable-shm</systemitem> and
146           <systemitem>--enable-shm</systemitem></title>
147  
148         <para>
149           These options can be used to control whether GTK+ will use shared 
150           memory to communicate with the X server when possible.
151           The default is yes.
152         </para>
153       </formalpara>
154
155       <formalpara>
156         <title><systemitem>--disable-xim</systemitem> and
157           <systemitem>--enable-xim</systemitem></title>
158  
159         <para>
160           These options can be used to control whether GTK+ will 
161           be compiled with support for XIM. 
162           The default is yes.
163         </para>
164       </formalpara>
165
166       <formalpara>
167         <title><systemitem>--disable-xim-inst</systemitem> and
168           <systemitem>--enable-xim-inst</systemitem></title>
169  
170         <para>
171           These options determine whether GTK+ will use the 
172           XIM instantiate callback. 
173           The default is yes, unless the host system is Solaris,
174           where <function>XRegisterIMInstantiateCallback</function>
175           seems to cause a segfault.
176         </para>
177       </formalpara>
178
179       <formalpara>
180         <title><systemitem>--disable-xkb</systemitem> and
181           <systemitem>--enable-xkb</systemitem></title>
182  
183         <para>
184           By default the <command>configure</command> script will try
185           to auto-detect whether the XKB extension is supported by
186           the X libraries GTK+ is linked with.
187           These options can be used to explicitly control whether
188           GTK+ will support the XKB extension. 
189         </para>
190       </formalpara>
191
192       <formalpara>
193         <title><systemitem>--disable-gtk-doc</systemitem> and
194           <systemitem>--enable-gtk-doc</systemitem></title>
195
196         <para>
197           By default the <command>configure</command> script will try
198           to auto-detect whether the
199           <application>gtk-doc</application> package is installed.  If
200           it is, then it will use it to extract and build the
201           documentation for the GTK+ library.  These options
202           can be used to explicitly control whether 
203           <application>gtk-doc</application> should be
204           used or not.  If it is not used, the distributed,
205           pre-generated HTML files will be installed instead of
206           building them on your machine.
207         </para>
208       </formalpara>
209
210       <formalpara>
211         <title><systemitem>--with-xinput</systemitem></title>
212
213         <para>
214           
215         </para>
216       </formalpara>
217
218       <formalpara>
219         <title><systemitem>--with-gdktarget</systemitem></title>
220
221         <para>
222           Toggles between the supported backends for GDK. 
223           The default is x11, unless the platform is Windows, in which
224           case the default is win32.
225         </para>
226       </formalpara>
227
228       <formalpara>
229         <title><systemitem>--disable-shadowfb</systemitem> and
230           <systemitem>--enable-shadowfb</systemitem></title>
231
232         <para>
233          Toggles shadow framebuffer support for the linux-fb target, 
234          if selected.
235         </para>
236       </formalpara>
237
238     </refsect1>
239
240 </refentry>