1 <refentry id="gtk-building" revision="6 Sept 2001">
3 <refentrytitle>Compiling the GTK+ package</refentrytitle>
4 <manvolnum>3</manvolnum>
5 <refmiscinfo>GTK Library</refmiscinfo>
9 <refname>Compiling the GTK+ Package</refname>
11 How to compile GTK+ itself
15 <refsect1 id="building">
16 <title>Building the Library on UNIX</title>
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:
28 <userinput>./configure</userinput>
29 <userinput>make</userinput>
30 <userinput>make install</userinput>
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
44 <refsect1 id="extra-configuration-options">
45 <title>Extra Configuration Options</title>
48 In addition to the normal options, the
49 <command>configure</command> script in the GTK+
50 library supports these additional arguments:
53 <command>configure</command>
56 <arg>--disable-modules</arg>
57 <arg>--enable-modules</arg>
60 <arg>--with-included-loaders==LOADER1,LOADER2,...</arg>
63 <arg>--enable-debug=[no|minimum|yes]</arg>
66 <arg>--disable-shm</arg>
67 <arg>--enable-shm</arg>
70 <arg>--disable-xim</arg>
71 <arg>--enable-xim</arg>
74 <arg>--disable-xim-inst</arg>
75 <arg>--enable-xim-inst</arg>
78 <arg>--disable-xkb</arg>
79 <arg>--enable-xkb</arg>
82 <arg>--disable-gtk-doc</arg>
83 <arg>--enable-gtk-doc</arg>
86 <arg>--with-xinput=[no|gxi|xfree]</arg>
89 <arg>--with-gdktarget=[x11|linux-fb|win32]</arg>
92 <arg>--disable-shadowfb</arg>
93 <arg>--enable-shadowfb</arg>
99 <title><systemitem>--disable-modules</systemitem> and
100 <systemitem>--enable-modules</systemitem></title>
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.
117 <title><systemitem>--with-included-loaders</systemitem></title>
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.
127 <title><systemitem>--enable-debug</systemitem></title>
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+.
145 <title><systemitem>--disable-shm</systemitem> and
146 <systemitem>--enable-shm</systemitem></title>
149 These options can be used to control whether GTK+ will use shared
150 memory to communicate with the X server when possible.
156 <title><systemitem>--disable-xim</systemitem> and
157 <systemitem>--enable-xim</systemitem></title>
160 These options can be used to control whether GTK+ will
161 be compiled with support for XIM.
167 <title><systemitem>--disable-xim-inst</systemitem> and
168 <systemitem>--enable-xim-inst</systemitem></title>
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.
180 <title><systemitem>--disable-xkb</systemitem> and
181 <systemitem>--enable-xkb</systemitem></title>
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.
193 <title><systemitem>--disable-gtk-doc</systemitem> and
194 <systemitem>--enable-gtk-doc</systemitem></title>
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.
211 <title><systemitem>--with-xinput</systemitem></title>
219 <title><systemitem>--with-gdktarget</systemitem></title>
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.
229 <title><systemitem>--disable-shadowfb</systemitem> and
230 <systemitem>--enable-shadowfb</systemitem></title>
233 Toggles shadow framebuffer support for the linux-fb target,