Patches by Hans Breuer:
[platform/upstream/glib.git] / INSTALL
1 Simple install procedure
2 ========================
3
4   % gzip -cd glib-1.3.1.tar.gz | tar xvf -  # unpack the sources
5   % cd glib-1.3.1                           # change to the toplevel directory
6   % ./configure                             # run the `configure' script
7   % make                                    # build GLIB
8   [ Become root if necessary ]
9   % make install                            # install GLIB
10
11 Requirements
12 ============
13
14 In order to implement conversions between character sets,
15 GLib requires an implementation of the standard iconv() routine.
16 Most modern systems will have a suitable implementation, however
17 many older systems lack an iconv() implementation. On such systems, 
18 you must install the libiconv library. This can be found at:
19
20  http://clisp.cons.org/~haible/packages-libiconv.html
21
22 If your system has an iconv implementation but you want to use
23 libiconv instead, you can pass the --with-libiconv option to
24 configure. This forces libiconv to be used. 
25
26 Note that if you have libiconv installed in your default include
27 search path (for instance, in /usr/local/), but don't enable
28 it, you will get an error while compiling GTK+ because the
29 iconv.h that libiconv installs hides the system iconv.
30
31 The Nitty-Gritty
32 ================
33
34 The 'configure' script can be given a number of options to enable
35 and disable various features. For a complete list, type:
36
37   ./configure --help
38
39 A few of the more important ones:
40
41 *  --prefix=PREFIX         install architecture-independent files in PREFIX
42                            [ Defaults to /usr/local ]
43
44 *  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
45                            [ Defaults to the value given to --prefix ]
46
47 Options can be given to the compiler and linker by setting
48 environment variables before running configure. A few of the more
49 important ones:
50
51  CC       : The C compiler to use
52  CPPFLAGS : Flags for the C preprocesser such as -I and -D
53  CFLAGS   : C compiler flags
54
55 The most important use of this is to set the
56 optimization/debugging flags. For instance, to compile with no
57 debugging information at all, run configure as:
58
59  CFLAGS=-O2 ./configure           # Bourne compatible shells (sh/bash/zsh)
60
61 or,
62
63  setenv CFLAGS -O2 ; ./configure  # csh and variants
64
65
66 Installation directories
67 ========================
68
69 The location of the installed files is determined by the --prefix
70 and --exec-prefix options given to configure. There are also more
71 detailed flags to control individual directories. However, the
72 use of these flags is not tested.
73
74 One particular detail to note, is that the architecture-dependent
75 include file glibconfig.h is installed in:
76
77   $exec_pref/lib/glib/include/
78
79 if you have a version in $prefix/include, this is out of date
80 and should be deleted.
81
82 A shell script glib-config is created during the configure
83 process, and installed in the bin/ directory
84 ($exec_prefix/bin). This is used to determine the location of glib
85 when building applications.  If you move glib after installation,
86 it will be necessary to edit this file.
87