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. To build
171
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.
292
When growing a GArray, Glib will clear the new chunk of memory.
290
293
Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will be cleared.
300
303
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
304
the node, which used to have pointers to the key and the value
302
305
stored at that node.
325
328
For sparse memory systems this behaviour is often inferior, so
326
329
memory pools can be disabled to avoid excessive caching and force
327
330
atomic maintenance of chunks through the <function>g_malloc()</function>
328
and <function>g_free()</function> functions. Code currently affected by
331
and <function>g_free()</function> functions. Code currently affected by
333
336
<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
337
<structname>GNode</structname>, <structname>GHash</structname>
338
allocations. The functions g_list_push_allocator(),
339
g_list_pop_allocator(), g_slist_push_allocator(),
340
g_slist_pop_allocator(), g_node_push_allocator() and
338
341
g_node_pop_allocator() are not available
348
<structname>GSignal</structname> disables all caching (potentially
351
<structname>GSignal</structname> disables all caching (potentially
354
<structname>GType</structname> doesn't honour the
355
<structname>GTypeInfo</structname>
357
<structname>GType</structname> doesn't honour the
358
<structname>GTypeInfo</structname>
356
359
<structfield>n_preallocs</structfield> field anymore
361
the <structname>GBSearchArray</structname> flag
364
the <structname>GBSearchArray</structname> flag
362
365
<literal>G_BSEARCH_ALIGN_POWER2</literal> becomes non-functional
465
468
By default the <command>configure</command> script will try
466
469
to auto-detect whether the C library provides a suitable set
467
of <function>printf()</function> functions. In detail,
470
of <function>printf()</function> functions. In detail,
468
471
<command>configure</command> checks that the semantics of
469
472
<function>snprintf()</function> are as specified by C99 and
470
473
that positional parameters as specified in the Single Unix
471
474
Specification are supported. If this not the case, GLib will
472
include an implementation of the <function>printf()</function>
475
include an implementation of the <function>printf()</function>
474
477
These options can be used to explicitly control whether
475
478
an implementation fo the <function>printf()</function> family
485
488
By default, GLib uses ELF visibility attributes to optimize
486
489
PLT table entries if the compiler supports ELF visibility
487
490
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.
491
implemented is that any header change forces a full
492
recompilation, and missing includes may go unnoticed.
490
493
Therefore, it makes sense to turn this feature off while
491
494
doing GLib development, even if the compiler supports ELF
492
visibility attributes. The <option>--disable-visibility</option>
495
visibility attributes. The <option>--disable-visibility</option>
493
496
option allows to do that.
520
523
By default the <command>configure</command> script will try
521
to auto-detect whether <application>xsltproc</application>
524
to auto-detect whether <application>xsltproc</application>
522
525
and the necessary Docbook stylesheets are installed. If
523
526
they are, then it will use them to rebuild the included
524
man pages from the XML sources. These options can be used
527
man pages from the XML sources. These options can be used
525
528
to explicitly control whether man pages should be rebuilt
526
used or not. The distribution includes pre-generated man
529
used or not. The distribution includes pre-generated man
537
540
to auto-detect whether the getxattr() family of functions
538
541
is available. If it is, then extended attribute support
539
542
will be included in GIO. These options can be used to
540
explicitly control whether extended attribute support
543
explicitly control whether extended attribute support
541
544
should be included or not. getxattr() and friends can
542
545
be provided by glibc or by the standalone libattr library.
551
554
By default the <command>configure</command> script will
552
555
auto-detect if libselinux is available and include
553
556
SELinux support in GIO if it is. These options can be
554
used to explicitly control whether SELinxu support should
557
used to explicitly control whether SELinux support should
563
<title><systemitem>--with-runtime-libdir=RELPATH</systemitem></title>
566
Allows specifying a relative path to where to install the runtime
567
libraries (meaning library files used for running, not developing,
568
GLib applications). This can be used in operating system setups where
569
programs using GLib needs to run before e.g. <filename>/usr</filename>
571
For example, if LIBDIR is <filename>/usr/lib</filename> and
572
<filename>../../lib</filename> is passed to
573
<systemitem>--with-runtime-libdir</systemitem> then the
574
runtime libraries are installed into <filename>/lib</filename> rather
575
than <filename>/usr/lib</filename>.