1 Simple install procedure
2 ========================
4 % gzip -cd glib-@GLIB_VERSION@.tar.gz | tar xvf - # unpack the sources
5 % cd glib-@GLIB_VERSION@ # change to the toplevel directory
6 % ./configure # run the `configure' script
9 [ Become root if necessary ]
10 % rm -rf /install-prefix/include/glib.h /install-prefix/include/gmodule.h
11 % make install # install GLIB
16 In order to implement conversions between character sets,
17 GLib requires an implementation of the standard iconv() routine.
18 Most modern systems will have a suitable implementation, however
19 many older systems lack an iconv() implementation. On such systems,
20 you must install the libiconv library. This can be found at:
22 http://clisp.cons.org/~haible/packages-libiconv.html
24 If your system has an iconv implementation but you want to use
25 libiconv instead, you can pass the --with-libiconv option to
26 configure. This forces libiconv to be used.
28 Note that if you have libiconv installed in your default include
29 search path (for instance, in /usr/local/), but don't enable
30 it, you will get an error while compiling GTK+ because the
31 iconv.h that libiconv installs hides the system iconv.
36 The 'configure' script can be given a number of options to enable
37 and disable various features. For a complete list, type:
41 A few of the more important ones:
43 * --prefix=PREFIX install architecture-independent files in PREFIX
44 [ Defaults to /usr/local ]
46 * --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
47 [ Defaults to the value given to --prefix ]
49 * --enable-gc-friendly When enabled all memory freed by the application,
50 but retained by GLib for performance reasons
51 is set to zero, thus making deployed garbage
52 collection or memory profiling tools detect
53 unlinked memory correctly. This will make GLib
55 [ Disabled by default ]
57 * --disable-threads Do not compile GLib to be multi thread safe. GLib
58 will be slightly faster then. This is however not
59 recommended, as many programs rely on GLib being
61 [ Enabled by default ]
63 * --with-threads=[none/posix/dce/solaris/win32] Specify a thread
64 implementation to use.
65 * 'posix' and 'dce' can be used interchangeable
66 to mean the different versions of posix
67 threads. configure tries to find out, which
69 * 'solaris' uses the native Solaris thread
71 * 'none' means that GLib will be thread safe,
72 but does not have a default thread
73 implementation. This has to be supplied to
74 g_thread_init() by the programmer.
75 [ Determined by configure by default ]
77 Options can be given to the compiler and linker by setting
78 environment variables before running configure. A few of the more
81 CC : The C compiler to use
82 CPPFLAGS : Flags for the C preprocesser such as -I and -D
83 CFLAGS : C compiler flags
85 The most important use of this is to set the
86 optimization/debugging flags. For instance, to compile with no
87 debugging information at all, run configure as:
89 CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
93 setenv CFLAGS -O2 ; ./configure # csh and variants
96 Installation directories
97 ========================
99 The location of the installed files is determined by the --prefix
100 and --exec-prefix options given to configure. There are also more
101 detailed flags to control individual directories. However, the
102 use of these flags is not tested.
104 One particular detail to note, is that the architecture-dependent
105 include file glibconfig.h is installed in:
107 $exec_pref/lib/glib/include/
109 if you have a version in $prefix/include, this is out of date
110 and should be deleted.
112 A shell script glib-config is created during the configure
113 process, and installed in the bin/ directory
114 ($exec_prefix/bin). This is used to determine the location of glib
115 when building applications. If you move glib after installation,
116 it will be necessary to edit this file.