18:36. incorporated proposed cleanups from gtk-devel-list.
[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 The Nitty-Gritty
12 ================
13
14 The 'configure' script can be given a number of options to enable
15 and disable various features. For a complete list, type:
16
17   ./configure --help
18
19 A few of the more important ones:
20
21 *  --prefix=PREFIX         install architecture-independent files in PREFIX
22                            [ Defaults to /usr/local ]
23
24 *  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
25                            [ Defaults to the value given to --prefix ]
26
27 Options can be given to the compiler and linker by setting
28 environment variables before running configure. A few of the more
29 important ones:
30
31  CC       : The C compiler to use
32  CPPFLAGS : Flags for the C preprocesser such as -I and -D
33  CFLAGS   : C compiler flags
34
35 The most important use of this is to set the
36 optimization/debugging flags. For instance, to compile with no
37 debugging information at all, run configure as:
38
39  CFLAGS=-O2 ./configure           # Bourne compatible shells (sh/bash/zsh)
40
41 or,
42
43  setenv CFLAGS -O2 ; ./configure  # csh and variants
44
45
46 Installation directories
47 ========================
48
49 The location of the installed files is determined by the --prefix
50 and --exec-prefix options given to configure. There are also more
51 detailed flags to control individual directories. However, the
52 use of these flags is not tested.
53
54 One particular detail to note, is that the architecture-dependent
55 include file glibconfig.h is installed in:
56
57   $exec_pref/lib/glib/include/
58
59 if you have a version in $prefix/include, this is out of date
60 and should be deleted.
61
62 A shell script glib-config is created during the configure
63 process, and installed in the bin/ directory
64 ($exec_prefix/bin). This is used to determine the location of glib
65 when building applications.  If you move glib after installation,
66 it will be necessary to edit this file.
67