Some more docs reshuffling

This commit is contained in:
Matthias Clasen 2011-11-12 22:52:24 -05:00
parent 06bb6c75a2
commit e60846dc78
2 changed files with 517 additions and 611 deletions

View File

@ -2,18 +2,16 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="glib-building" revision="16 Jan 2002">
<refmeta>
<refentrytitle>Compiling the GLib package</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GLib Library</refmiscinfo>
</refmeta>
<refentry id="glib-building">
<refmeta>
<refentrytitle>Compiling the GLib package</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GLib Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Compiling the GLib Package</refname>
<refpurpose>
How to compile GLib itself
</refpurpose>
<refnamediv>
<refname>Compiling the GLib Package</refname>
<refpurpose>How to compile GLib itself</refpurpose>
</refnamediv>
<refsect1 id="building">
@ -62,8 +60,7 @@ How to compile GLib itself
<itemizedlist>
<listitem>
<para>
<ulink
url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink>
<ulink url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink>
is a tool for tracking the compilation flags needed for
libraries that are used by the GLib library. (For each
library, a small <literal>.pc</literal> text file is
@ -145,8 +142,7 @@ How to compile GLib itself
<listitem>
<para>
A thread implementation is needed. The thread support in GLib
can be based upon several native thread implementations, e.g.
POSIX threads, win32 threads or Solaris threads.
can be based upon POSIX threads or win32 threads.
</para>
</listitem>
<listitem>
@ -155,8 +151,8 @@ How to compile GLib itself
for regular expression matching. The default is to use the internal
version of PCRE that is patched to use GLib for memory management
and Unicode handling. If you prefer to use the system-supplied PCRE
library you can pass the --with-pcre=system option to configure,
but it is not recommended.
library you can pass the <option>--with-pcre=system</option> option
to, but it is not recommended.
</para>
</listitem>
<listitem>
@ -165,29 +161,32 @@ How to compile GLib itself
getxattr() family of functions that may be provided by glibc or
by the standalone libattr library. To build GLib without extended
attribute support, use the <option>--disable-xattr</option>
option.
</para>
</listitem>
<listitem>
<para>
The optional SELinux support in GIO requires libselinux.
To build GLib without SELinux support, use the
<option>--disable-selinux</option> option.
</para>
</listitem>
<listitem>
<para>
The optional support for DTrace requires the
<filename>sys/sdt.h</filename> header, which is provided
by SystemTap on Linux. To build GLib without DTrace, use
the <option>--disable-dtrace</option> configure option.
</para>
</listitem>
<listitem>
<para>
The optional support for
<ulink url="http://sourceware.org/systemtap/">SystemTap</ulink>
can be disabled with the <option>--disable-systemtap</option>
configure option.
</para>
</listitem>
<listitem>
<para>
The optional SELinux support in GIO requires libselinux. To build
GLib without SELinux support, use the
<option>--disable-selinux</option> configure option.
</para>
</listitem>
<listitem>
<para>
The optional support for DTrace requires the <filename>sys/sdt.h</filename> header,
which is provided by SystemTap on Linux. To build GLib without DTrace, use the
<option>--disable-dtrace</option> configure option.
</para>
</listitem>
<listitem>
<para>
The optional support for <ulink url="http://sourceware.org/systemtap/">SystemTap</ulink> can be disabled with the
<option>--disable-systemtap</option> configure option.
</para>
</listitem>
</itemizedlist>
</refsect1>
@ -198,74 +197,6 @@ How to compile GLib itself
In addition to the normal options, the
<command>configure</command> script in the GLib
library supports these additional arguments:
<cmdsynopsis>
<command>configure</command>
<group>
<arg>--enable-debug=[no|minimum|yes]</arg>
</group>
<group>
<arg>--disable-gc-friendly</arg>
<arg>--enable-gc-friendly</arg>
</group>
<group>
<arg>--disable-mem-pools</arg>
<arg>--enable-mem-pools</arg>
</group>
<group>
<arg>--disable-threads</arg>
<arg>--enable-threads</arg>
</group>
<group>
<arg>--with-threads=[none|posix|dce|win32]</arg>
</group>
<group>
<arg>--disable-regex</arg>
<arg>--enable-regex</arg>
</group>
<group>
<arg>--with-pcre=[internal|system]</arg>
</group>
<group>
<arg>--disable-included-printf</arg>
<arg>--enable-included-printf</arg>
</group>
<group>
<arg>--disable-Bsymbolic</arg>
<arg>--enable-Bsymbolic</arg>
</group>
<group>
<arg>--disable-gtk-doc</arg>
<arg>--enable-gtk-doc</arg>
</group>
<group>
<arg>--disable-man</arg>
<arg>--enable-man</arg>
</group>
<group>
<arg>--disable-xattr</arg>
<arg>--enable-xattr</arg>
</group>
<group>
<arg>--disable-selinux</arg>
<arg>--enable-selinux</arg>
</group>
<group>
<arg>--disable-dtrace</arg>
<arg>--enable-dtrace</arg>
</group>
<group>
<arg>--disable-systemtap</arg>
<arg>--enable-systemtap</arg>
</group>
<group>
<arg>--enable-gcov</arg>
<arg>--disable-gcov</arg>
</group>
<group>
<arg>--with-runtime-libdir=RELPATH</arg>
</group>
</cmdsynopsis>
</para>
<formalpara>
@ -291,34 +222,31 @@ How to compile GLib itself
<para>
By default, and with <systemitem>--disable-gc-friendly</systemitem>
as well, Glib does not clear the memory for certain objects before they
are freed. For example, Glib may decide to recycle GList nodes by
putting them in a free list. However, memory profiling and debugging tools like <ulink
url="http://www.valgrind.org">Valgrind</ulink> work better if an
application does not keep dangling pointers to freed memory (even
though these pointers are no longer dereferenced), or invalid pointers inside
uninitialized memory. The
<systemitem>--enable-gc-friendly</systemitem> option makes Glib clear
memory in these situations:
as well, Glib does not clear the memory for certain objects before
they are freed. For example, Glib may decide to recycle GList nodes
by putting them in a free list. However, memory profiling and debugging
tools like <ulink url="http://www.valgrind.org">Valgrind</ulink> work
better if an application does not keep dangling pointers to freed
memory (even though these pointers are no longer dereferenced), or
invalid pointers inside uninitialized memory.
The <systemitem>--enable-gc-friendly</systemitem> option makes Glib
clear memory in these situations:
</para>
</formalpara>
<itemizedlist>
<listitem>
<para>
When shrinking a GArray, Glib will clear the memory no longer
available in the array: shrink an array from 10 bytes to 7, and
the last 3 bytes will be cleared. This includes removals of single and multiple elements.
</para>
</listitem>
<listitem>
<para>
the last 3 bytes will be cleared. This includes removals of single
and multiple elements.
</para>
</listitem>
<listitem>
<para>
When growing a GArray, Glib will clear the new chunk of memory.
Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will be cleared.
Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will
be cleared.
</para>
</listitem>
<listitem>
@ -336,7 +264,8 @@ How to compile GLib itself
<listitem>
<para>
When destroying or removing a GTree node, Glib will clear the node,
which used to have pointers to the node's value, and the left and right subnodes.
which used to have pointers to the node's value, and the left and
right subnodes.
</para>
</listitem>
</itemizedlist>
@ -345,6 +274,7 @@ How to compile GLib itself
Since clearing the memory has a cost,
<systemitem>--disable-gc-friendly</systemitem> is the default.
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-mem-pools</systemitem> and
@ -376,8 +306,8 @@ How to compile GLib itself
</listitem>
<listitem>
<para>
<structname>GSignal</structname> disables all caching (potentially
very slow)
<structname>GSignal</structname> disables all caching
(potentially very slow)
</para>
</listitem>
<listitem>
@ -397,39 +327,13 @@ How to compile GLib itself
</para>
</formalpara>
<formalpara>
<title><systemitem>--disable-threads</systemitem> and
<systemitem>--enable-threads</systemitem></title>
<para>
Do not compile GLib to be multi thread safe. GLib
will be slightly faster then. This is however not
recommended, as many programs rely on GLib being
multi thread safe.
</para>
</formalpara>
<formalpara>
<title><systemitem>--with-threads</systemitem></title>
<para>
Specify a thread implementation to use.
<itemizedlist>
<listitem><para>
'posix' and 'dce' can be used interchangeable
to mean the different versions of Posix
threads. configure tries to find out, which
one is installed.
</para></listitem>
<listitem><para>
'none' means that GLib will be thread safe,
but does not have a default thread
implementation. This has to be supplied to
<function>g_thread_init()</function> by the programmer.
</para></listitem>
</itemizedlist>
Specify a thread implementation to use. Available options are
'posix' or 'win32'. Normally, <command>configure</command>
should be able to work out the system threads API on its own.
</para>
</formalpara>
@ -452,15 +356,18 @@ How to compile GLib itself
Specify whether to use the internal or the system-supplied
PCRE library.
<itemizedlist>
<listitem><para>
<listitem>
<para>
'internal' means that GRegex will be compiled to use
the internal PCRE library.
</para></listitem>
<listitem><para>
</para>
</listitem>
<listitem>
<para>
'system' means that GRegex will be compiled to use
the system-supplied PCRE library.
</para></listitem>
</para>
</listitem>
</itemizedlist>
Using the internal PCRE is the preferred solution:
<itemizedlist>
@ -495,16 +402,15 @@ How to compile GLib itself
<para>
By default the <command>configure</command> script will try
to auto-detect whether the C library provides a suitable set
of <function>printf()</function> functions. In detail,
<command>configure</command> checks that the semantics of
<function>snprintf()</function> are as specified by C99 and
that positional parameters as specified in the Single Unix
of printf() functions. In detail, <command>configure</command>
checks that the semantics of snprintf() are as specified by C99
and that positional parameters as specified in the Single Unix
Specification are supported. If this not the case, GLib will
include an implementation of the <function>printf()</function>
family.
include an implementation of the printf() family.
</para>
<para>
These options can be used to explicitly control whether
an implementation fo the <function>printf()</function> family
should be included or not.
an implementation fo the printf() family should be included or not.
</para>
</formalpara>
@ -531,8 +437,8 @@ How to compile GLib itself
<para>
By default the <command>configure</command> script will try
to auto-detect whether the
<application>gtk-doc</application> package is installed. If
it is, then it will use it to extract and build the
<application>gtk-doc</application> package is installed.
If it is, then it will use it to extract and build the
documentation for the GLib library. These options
can be used to explicitly control whether
<application>gtk-doc</application> should be
@ -549,8 +455,8 @@ How to compile GLib itself
<para>
By default the <command>configure</command> script will try
to auto-detect whether <application>xsltproc</application>
and the necessary Docbook stylesheets are installed. If
they are, then it will use them to rebuild the included
and the necessary Docbook stylesheets are installed.
If they are, then it will use them to rebuild the included
man pages from the XML sources. These options can be used
to explicitly control whether man pages should be rebuilt
used or not. The distribution includes pre-generated man

View File

@ -17,17 +17,17 @@
<chapter id="glib">
<title>GLib Overview</title>
<para>
GLib is a general-purpose utility library, which provides many useful data
types, macros, type conversions, string utilities, file utilities, a main
loop abstraction, and so on. It works on many UNIX-like platforms, Windows,
OS/2 and BeOS. GLib is released under the GNU Library General Public License
(GNU LGPL).
GLib is a general-purpose utility library, which provides many useful
data types, macros, type conversions, string utilities, file utilities,
a mainloop abstraction, and so on. It works on many UNIX-like platforms,
Windows, OS/2 and BeOS. GLib is released under the GNU Library General
Public License (GNU LGPL).
</para>
<para>
The general policy of GLib is that all functions are invisibly threadsafe with the
exception of data structure manipulation functions, where, if you have two threads
manipulating the <emphasis>same</emphasis> data structure, they must use a lock to
synchronize their operation.
The general policy of GLib is that all functions are invisibly threadsafe
with the exception of data structure manipulation functions, where, if
you have two threads manipulating the <emphasis>same</emphasis> data
structure, they must use a lock to synchronize their operation.
</para>
<xi:include href="building.sgml" />
@ -60,6 +60,7 @@ synchronize their operation.
<xi:include href="xml/async_queues.xml" />
<xi:include href="xml/modules.xml" />
<xi:include href="xml/memory.xml" />
<xi:include href="xml/memory_slices.xml" />
<xi:include href="xml/iochannels.xml" />
<xi:include href="xml/error_reporting.xml" />
<xi:include href="xml/warnings.xml" />
@ -102,7 +103,6 @@ synchronize their operation.
<chapter id="glib-data-types">
<title>GLib Data Types</title>
<xi:include href="xml/memory_slices.xml" />
<xi:include href="xml/linked_lists_double.xml" />
<xi:include href="xml/linked_lists_single.xml" />
<xi:include href="xml/queue.xml" />