+<?xml version="1.0"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
+]>
<refentry id="gtk-building" revision="6 Sept 2001">
<refmeta>
<refentrytitle>Compiling the GTK+ libraries</refentrytitle>
of the tools are already included in the source packages. But
it's useful to know a bit about how packages that use these
tools work. A source package is distributed as a
- <literal>tar.gz</literal> file which you unpack into a
- directory full of the source files as follows:
+ <literal>tar.gz</literal> or <literal>tar.bz2</literal> file
+ which you unpack into a directory full of the source files as follows:
</para>
<programlisting>
tar xvfz gtk+-2.0.0.tar.gz
+ tar xvfj gtk+-2.0.0.tar.bz2
</programlisting>
<para>
In the toplevel of the directory that is created, there will be
a search path that <command>pkg-config</command> (see below)
uses when looking for for file describing how to compile
programs using different libraries. If you were installing GTK+
- and it's dependencies into <filename>/opt/gtk</filename>, you might want to set
- these variables as:
+ and it's dependencies into <filename>/opt/gtk</filename>, you
+ might want to set these variables as:
</para>
<programlisting>
CPPFLAGS="-I/opt/gtk/include"
<listitem>
<para>
<ulink
- url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink>
+ url="http://www.freedesktop.org/software/pkgconfig">pkg-config</ulink>
is a tool for tracking the compilation flags needed for
- libraries that is used by the GTK+ libraries. (For each
- library, a small <literal>.pc</literal> text file is installed in a standard
- location that contains the compilation flags needed for that
- library along with version number information.) The version
- of <command>pkg-config</command> needed to build GTK+ is
- mirrored in the <filename>dependencies</filename> directory
- on the <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.0/">GTK+ FTP
+ libraries that are used by the GTK+ libraries. (For each
+ library, a small <literal>.pc</literal> text file is installed
+ in a standard location that contains the compilation flags
+ needed for that library along with version number information.)
+ The version of <command>pkg-config</command> needed to build
+ GTK+ is mirrored in the <filename>dependencies</filename> directory
+ on the <ulink url="ftp://ftp.gtk.org/pub/gtk/">GTK+ FTP
site.</ulink>
</para>
</listitem>
<para>
The GLib library provides core non-graphical functionality
such as high level data types, Unicode manipulation, and
- a object and type system to C programs. It is available
- from the <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.0/">GTK+
+ an object and type system to C programs. It is available
+ from the <ulink url="ftp://ftp.gtk.org/pub/glib/">GTK+
FTP site.</ulink>
</para>
</listitem>
<listitem>
<para>
- Pango is a library for internationalized text handling. It
- is available from the <ulink
- url="ftp://ftp.gtk.org/pub/gtk/v2.0/">GTK+ FTP site.</ulink>
+ <ulink url="http://www.pango.org">Pango</ulink> is a library
+ for internationalized text handling. It is available from
+ the <ulink url="ftp://ftp.gtk.org/pub/pango/">GTK+ FTP
+ site.</ulink>.
</para>
</listitem>
<listitem>
interfaces allowing accessibility technologies such as
screen readers to interact with a graphical user interface.
It is available from the <ulink
- url="ftp://ftp.gtk.org/pub/gtk/v2.0/">GTK+ FTP site.</ulink>
+ url="ftp://ftp.gtk.org/pub/atk/">GTK+ FTP site.</ulink>
</para>
</listitem>
<listitem>
<listitem>
<para>
The libintl library from the <ulink
- url="http://www.gtk.org/software/gettext">GNU gettext
+ url="http://www.gnu.org/software/gettext/">GNU gettext
package</ulink> is needed if your system doesn't have the
<function>gettext()</function> functionality for handling
message translation databases.
The <ulink
url="ftp://ftp.uu.net/graphics/jpeg/">JPEG</ulink>,
<ulink url="http://www.libpng.org">PNG</ulink>, and
- <ulink url="http://www.libtiff.org">TIFF</ulink> image loading libraries are needed to
- compile GTK+. You probably already have these libraries
- installed, but if not, the versions you need are available in
- the <filename>dependencies</filename> directory on the the
- <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.0/dependencies/">GTK+
+ <ulink url="http://www.libtiff.org">TIFF</ulink> image
+ loading libraries are needed to compile GTK+. You probably
+ already have these libraries installed, but if not, the
+ versions you need are available in the
+ <filename>dependencies</filename> directory on the the
+ <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.6/dependencies/">GTK+
FTP site.</ulink>. (Before installing these libraries
from source, you should check if your operating system
vendor has prebuilt packages of these libraries that you
don't have installed.)
</para>
</listitem>
- <listitem>
- <para>
- While not required for running GTK+ on X, you may want install the
- <ulink url="http://www.freetype.org">FreeType
- library</ulink> so that the PangoFT2 backend for Pango will
- be built. This backend is used by the linux-fb backend for
- GTK+ and applications that want to render independently
- of the X display. You'll need at least version 2.0.1.
- </para>
- </listitem>
<listitem>
<para>
The libraries from the X window system are needed to build
Pango and GTK+. You should already have these installed on
your system, but it's possible that you'll need to install
the development environment for these libraries that your
- operating system vendor provides. If you have a recent
- version of the XFree86 system, such as 4.2.0, then Pango
- and GTK+ will take advantage of the Xft and Xrender
- libraries to provide anti-aliased and scaleable fonts in
- a much more sophisticated fashion then the support for
- core X fonts.
+ operating system vendor provides.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <ulink url="http://www.fontconfig.org">fontconfig</ulink>
+ library provides Pango with a standard way of locating
+ fonts and matching them against font names.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://www.cairographics.org">Cairo</ulink>
+ is a graphics library that supports vector graphics and image
+ compositing. Both Pango and GTK+ use cairo for much of their
+ drawing.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://live.gnome.org/GObjectIntrospection">gobject-introspection</ulink>
+ is a framework for making introspection data available to
+ language bindings.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <ulink url="http://www.freedesktop.org/wiki/Software/shared-mime-info">shared-mime-info</ulink>
+ package is not a hard dependency of GTK+, but it contains definitions
+ for mime types that are used by GIO and, indirectly, by GTK+.
+ gdk-pixbuf will use GIO for mime type detection if possible. For this
+ to work, shared-mime-info needs to be installed and
+ <envar>XDG_DATA_DIRS</envar> set accordingly at configure time.
+ Otherwise, gdk-pixbuf falls back to its built-in mime type detection.
+ </para>
+ </listitem>
</itemizedlist>
</refsect1>
<refsect1 id="building">
<link linkend="gtk-compiling">start compiling your own GTK+
applications</link>. You can test your GTK+ installation
by running the <command>gtk-demo</command> program that
- GTK+ installs. If you have the Xft library, you can turn on
- anti-aliased fonts by setting the <envar>GDK_USE_XFT</envar>
- environment variable.
+ GTK+ installs.
</para>
- <programlisting>
- GDK_USE_XFT=1 gtk-demo
- </programlisting>
<para>
If one of the <filename>configure</filename> scripts fails or running
<command>make</command> fails, look closely at the error
<group>
<arg>--with-included-loaders==LOADER1,LOADER2,...</arg>
</group>
+ <group>
+ <arg>--with-included-immodules=MODULE1,MODULE2,...</arg>
+ </group>
<group>
<arg>--enable-debug=[no|minimum|yes]</arg>
</group>
+ <group>
+ <arg>--disable-visibility</arg>
+ <arg>--enable-visibility</arg>
+ </group>
<group>
<arg>--disable-shm</arg>
<arg>--enable-shm</arg>
<arg>--disable-xkb</arg>
<arg>--enable-xkb</arg>
</group>
+ <group>
+ <arg>--disable-xinerama</arg>
+ <arg>--enable-xinerama</arg>
+ </group>
<group>
<arg>--disable-gtk-doc</arg>
<arg>--enable-gtk-doc</arg>
</group>
+ <group>
+ <arg>--disable-cups</arg>
+ <arg>--enable-cups</arg>
+ </group>
<group>
<arg>--with-xinput=[no|yes]</arg>
</group>
<group>
- <arg>--with-gdktarget=[x11|linux-fb|win32]</arg>
- </group>
- <group>
- <arg>--disable-shadowfb</arg>
- <arg>--enable-shadowfb</arg>
+ <arg>--with-gdktarget=[x11|win32|quartz|directfb]</arg>
</group>
+ <group>
+ <arg>--disable-introspection</arg>
+ </group>
</cmdsynopsis>
</para>
</para>
</formalpara>
+ <formalpara>
+ <title><systemitem>--with-included-immodules</systemitem></title>
+
+ <para>
+ This option allows you to specify which input method modules you
+ want to include.
+ </para>
+ </formalpara>
+
<formalpara>
<title><systemitem>--enable-debug</systemitem></title>
</para>
</formalpara>
+ <formalpara>
+ <title><systemitem>--disable-visibility</systemitem> and
+ <systemitem>--enable-visibility</systemitem></title>
+ <para>
+ The option <systemitem>--disable-visibility</systemitem>
+ turns off the use of ELF visibility attributes for linking
+ optimizations. This makes sense while changing GTK+ itself,
+ since the way in which GTK+ uses visibility attributes
+ forces a full rebuild of all source files for any header
+ modification.
+ </para>
+ </formalpara>
+
<formalpara>
<title><systemitem>--enable-explicit-deps</systemitem> and
<systemitem>--disable-explicit-deps</systemitem></title>
</para>
</formalpara>
+ <formalpara>
+ <title><systemitem>--disable-xinerama</systemitem> and
+ <systemitem>--enable-xinerama</systemitem></title>
+
+ <para>
+ By default the <command>configure</command> script will try
+ to link against the Xinerama libraries if they are found.
+ These options can be used to explicitly control whether
+ Xinerama should be used.
+ </para>
+ </formalpara>
+
<formalpara>
<title><systemitem>--disable-gtk-doc</systemitem> and
<systemitem>--enable-gtk-doc</systemitem></title>
</para>
</formalpara>
+ <formalpara>
+ <title><systemitem>--disable-cups</systemitem> and
+ <systemitem>--enable-cups</systemitem></title>
+
+ <para>
+ By default the <command>configure</command> script will try
+ to build the cups print backend if the cups libraries are found.
+ These options can be used to explicitly control whether
+ the cups print backend should be built.
+ </para>
+ </formalpara>
+
<formalpara>
<title><systemitem>--with-xinput</systemitem></title>
<para>
<para>
Toggles between the supported backends for GDK.
The default is x11, unless the platform is Windows, in which
- case the default is win32.
+ case the default is win32. Other supported backends are
+ the quartz backend for OS X, and the DirectFB backend
+ for the Linux framebuffer.
</para>
</formalpara>
-
<formalpara>
- <title><systemitem>--disable-shadowfb</systemitem> and
- <systemitem>--enable-shadowfb</systemitem></title>
+ <title><systemitem>--disable-introspection</systemitem></title>
- <para>
- Toggles shadow framebuffer support for the linux-fb target,
- if selected.
- </para>
+ <para>
+ Build without introspection support.
+ </para>
</formalpara>
-
</refsect1>
</refentry>