40
40
the standard options.
43
The GTK+ documentation contains
44
<ulink url="../gtk/gtk-building.html">further details</ulink>
45
about the build process and ways to influence it.
43
The GTK+ documentation contains
44
<ulink url="../gtk/gtk-building.html">further details</ulink>
45
about the build process and ways to influence it.
48
48
<refsect1 id="dependencies">
62
62
url="http://www.freedesktop.org/software/pkgconfig/">pkg-config</ulink>
63
63
is a tool for tracking the compilation flags needed for
64
64
libraries that are used by the GLib library. (For each
65
library, a small <literal>.pc</literal> text file is
66
installed in a standard location that contains the compilation
67
flags needed for that library along with version number
68
information.) The version of <command>pkg-config</command>
69
needed to build GLib is mirrored in the
65
library, a small <literal>.pc</literal> text file is
66
installed in a standard location that contains the compilation
67
flags needed for that library along with version number
68
information.) The version of <command>pkg-config</command>
69
needed to build GLib is mirrored in the
70
70
<filename>dependencies</filename> directory
71
71
on the <ulink url="ftp://ftp.gtk.org/pub/gtk/v2.2/">GTK+ FTP
95
95
system doesn't have the <function>iconv()</function>
96
96
function for doing conversion between character
97
97
encodings. Most modern systems should have
98
<function>iconv()</function>, however many older systems lack
99
an <function>iconv()</function> implementation. On such systems,
98
<function>iconv()</function>, however many older systems lack
99
an <function>iconv()</function> implementation. On such systems,
100
100
you must install the libiconv library. This can be found at:
101
<ulink url="http://www.gnu.org/software/libiconv">http://www.gnu.org/software/libiconv</ulink>.
101
<ulink url="http://www.gnu.org/software/libiconv">http://www.gnu.org/software/libiconv</ulink>.
104
104
If your system has an <function>iconv()</function> implementation but
105
105
you want to use libiconv instead, you can pass the
106
106
--with-libiconv option to configure. This forces
110
110
Note that if you have libiconv installed in your default include
111
111
search path (for instance, in <filename>/usr/local/</filename>), but
112
112
don't enable it, you will get an error while compiling GLib because
113
113
the <filename>iconv.h</filename> that libiconv installs hides the
117
117
If you are using the native iconv implementation on Solaris
118
instead of libiconv, you'll need to make sure that you have
118
instead of libiconv, you'll need to make sure that you have
119
119
the converters between locale encodings and UTF-8 installed.
120
120
At a minimum you'll need the SUNWuiu8 package. You probably
121
121
should also install the SUNWciu8, SUNWhiu8, SUNWjiu8, and
143
143
A thread implementation is needed, unless you want to compile GLib
144
144
without thread support, which is not recommended. The thread support
145
145
in GLib can be based upon several native thread implementations,
146
e.g. POSIX threads, DCE threads or Solaris threads.
146
e.g. POSIX threads, DCE threads or Solaris threads.
161
The optional extended attribute support in GIO requires the
162
getxattr() family of functions that may be provided by glibc or
163
by the standalone libattr library. To build GLib without extended
164
attribute support, use the <option>--disable-xattr</option>
161
The optional extended attribute support in GIO requires the
162
getxattr() family of functions that may be provided by glibc or
163
by the standalone libattr library. To build GLib without extended
164
attribute support, use the <option>--disable-xattr</option>
165
165
configure option.
170
The optional SELinux support in GIO requires libselinux. To build
171
GLib without SELinux support, use the
170
The optional SELinux support in GIO requires libselinux.
171
To build GLib without SELinux support, use the
172
172
<option>--disable-selinux</option> configure option.
289
When growing a GArray, Glib will clear the new chunk of memory.
290
Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will be cleared.
289
When growing a GArray, Glib will clear the new chunk of memory.
290
Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will
300
301
When freeing a node from a GHashTable, Glib will first clear
301
the node, which used to have pointers to the key and the value
302
the node, which used to have pointers to the key and the value
302
303
stored at that node.
307
When destroying or removing a GTree node, Glib will clear the node,
308
which used to have pointers to the node's value, and the left and right subnodes.
308
When destroying or removing a GTree node, Glib will clear the
309
node, which used to have pointers to the node's value, and the
310
left and right subnodes.
325
327
For sparse memory systems this behaviour is often inferior, so
326
328
memory pools can be disabled to avoid excessive caching and force
327
329
atomic maintenance of chunks through the <function>g_malloc()</function>
328
and <function>g_free()</function> functions. Code currently affected by
330
and <function>g_free()</function> functions. Code currently affected by
333
335
<structname>GList</structname>, <structname>GSList</structname>,
334
<structname>GNode</structname>, <structname>GHash</structname>
335
allocations. The functions g_list_push_allocator(),
336
g_list_pop_allocator(), g_slist_push_allocator(),
337
g_slist_pop_allocator(), g_node_push_allocator() and
336
<structname>GNode</structname>, <structname>GHash</structname>
337
allocations. The functions g_list_push_allocator(),
338
g_list_pop_allocator(), g_slist_push_allocator(),
339
g_slist_pop_allocator(), g_node_push_allocator() and
338
340
g_node_pop_allocator() are not available
348
<structname>GSignal</structname> disables all caching (potentially
350
<structname>GSignal</structname> disables all caching (potentially
354
<structname>GType</structname> doesn't honour the
355
<structname>GTypeInfo</structname>
356
<structname>GType</structname> doesn't honour the
357
<structname>GTypeInfo</structname>
356
358
<structfield>n_preallocs</structfield> field anymore
361
the <structname>GBSearchArray</structname> flag
363
the <structname>GBSearchArray</structname> flag
362
364
<literal>G_BSEARCH_ALIGN_POWER2</literal> becomes non-functional
465
467
By default the <command>configure</command> script will try
466
468
to auto-detect whether the C library provides a suitable set
467
of <function>printf()</function> functions. In detail,
469
of <function>printf()</function> functions. In detail,
468
470
<command>configure</command> checks that the semantics of
469
471
<function>snprintf()</function> are as specified by C99 and
470
472
that positional parameters as specified in the Single Unix
471
473
Specification are supported. If this not the case, GLib will
472
include an implementation of the <function>printf()</function>
474
include an implementation of the <function>printf()</function>
474
476
These options can be used to explicitly control whether
475
477
an implementation fo the <function>printf()</function> family
485
487
By default, GLib uses ELF visibility attributes to optimize
486
488
PLT table entries if the compiler supports ELF visibility
487
489
attributes. A side-effect of the way in which this is currently
488
implemented is that any header change forces a full
489
recompilation, and missing includes may go unnoticed.
490
implemented is that any header change forces a full
491
recompilation, and missing includes may go unnoticed.
490
492
Therefore, it makes sense to turn this feature off while
491
493
doing GLib development, even if the compiler supports ELF
492
visibility attributes. The <option>--disable-visibility</option>
494
visibility attributes. The <option>--disable-visibility</option>
493
495
option allows to do that.
502
504
By default the <command>configure</command> script will try
503
505
to auto-detect whether the
504
<application>gtk-doc</application> package is installed. If
505
it is, then it will use it to extract and build the
506
<application>gtk-doc</application> package is installed.
507
If it is, then it will use it to extract and build the
506
508
documentation for the GLib library. These options
507
509
can be used to explicitly control whether
508
510
<application>gtk-doc</application> should be
520
522
By default the <command>configure</command> script will try
521
to auto-detect whether <application>xsltproc</application>
523
to auto-detect whether <application>xsltproc</application>
522
524
and the necessary Docbook stylesheets are installed. If
523
525
they are, then it will use them to rebuild the included
524
man pages from the XML sources. These options can be used
526
man pages from the XML sources. These options can be used
525
527
to explicitly control whether man pages should be rebuilt
526
used or not. The distribution includes pre-generated man
528
used or not. The distribution includes pre-generated man
537
539
to auto-detect whether the getxattr() family of functions
538
540
is available. If it is, then extended attribute support
539
541
will be included in GIO. These options can be used to
540
explicitly control whether extended attribute support
542
explicitly control whether extended attribute support
541
543
should be included or not. getxattr() and friends can
542
544
be provided by glibc or by the standalone libattr library.
551
553
By default the <command>configure</command> script will
552
554
auto-detect if libselinux is available and include
553
555
SELinux support in GIO if it is. These options can be
554
used to explicitly control whether SELinxu support should
556
used to explicitly control whether SELinux support should