1 | Simple install procedure |
---|
2 | ======================== |
---|
3 | |
---|
4 | % gzip -cd glib-1.2.10.tar.gz | tar xvf - # unpack the sources |
---|
5 | % cd glib-1.2.10 # change to the toplevel directory |
---|
6 | % ./configure # run the `configure' script |
---|
7 | % make # build GLIB |
---|
8 | |
---|
9 | [ Become root if necessary ] |
---|
10 | % rm -rf /install-prefix/include/glib.h /install-prefix/include/gmodule.h |
---|
11 | % make install # install GLIB |
---|
12 | |
---|
13 | Special note for GLib+-1.2.9 |
---|
14 | ============================ |
---|
15 | |
---|
16 | Between GLib-1.2.8 and GLib-1.2.9, the include files for GLib |
---|
17 | have been moved to $(includedir)/gtk-1-2/ to allow parallel installations |
---|
18 | of GLib-1.2 and GLib-2.0 to work correctly. If you are installing |
---|
19 | on top of an old installation of GLib, you should remove the files: |
---|
20 | |
---|
21 | $(includedir)/glib.h |
---|
22 | $(includedir)/gmodule.h |
---|
23 | |
---|
24 | Before running 'make install' |
---|
25 | |
---|
26 | The Nitty-Gritty |
---|
27 | ================ |
---|
28 | |
---|
29 | The 'configure' script can be given a number of options to enable |
---|
30 | and disable various features. For a complete list, type: |
---|
31 | |
---|
32 | ./configure --help |
---|
33 | |
---|
34 | A few of the more important ones: |
---|
35 | |
---|
36 | * --prefix=PREFIX install architecture-independent files in PREFIX |
---|
37 | [ Defaults to /usr/local ] |
---|
38 | |
---|
39 | * --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
---|
40 | [ Defaults to the value given to --prefix ] |
---|
41 | |
---|
42 | Options can be given to the compiler and linker by setting |
---|
43 | environment variables before running configure. A few of the more |
---|
44 | important ones: |
---|
45 | |
---|
46 | CC : The C compiler to use |
---|
47 | CPPFLAGS : Flags for the C preprocesser such as -I and -D |
---|
48 | CFLAGS : C compiler flags |
---|
49 | |
---|
50 | The most important use of this is to set the |
---|
51 | optimization/debugging flags. For instance, to compile with no |
---|
52 | debugging information at all, run configure as: |
---|
53 | |
---|
54 | CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh) |
---|
55 | |
---|
56 | or, |
---|
57 | |
---|
58 | setenv CFLAGS -O2 ; ./configure # csh and variants |
---|
59 | |
---|
60 | |
---|
61 | Installation directories |
---|
62 | ======================== |
---|
63 | |
---|
64 | The location of the installed files is determined by the --prefix |
---|
65 | and --exec-prefix options given to configure. There are also more |
---|
66 | detailed flags to control individual directories. However, the |
---|
67 | use of these flags is not tested. |
---|
68 | |
---|
69 | One particular detail to note, is that the architecture-dependent |
---|
70 | include file glibconfig.h is installed in: |
---|
71 | |
---|
72 | $exec_pref/lib/glib/include/ |
---|
73 | |
---|
74 | if you have a version in $prefix/include, this is out of date |
---|
75 | and should be deleted. |
---|
76 | |
---|
77 | A shell script glib-config is created during the configure |
---|
78 | process, and installed in the bin/ directory |
---|
79 | ($exec_prefix/bin). This is used to determine the location of glib |
---|
80 | when building applications. If you move glib after installation, |
---|
81 | it will be necessary to edit this file. |
---|
82 | |
---|