1 | Simple install procedure |
---|
2 | ======================== |
---|
3 | |
---|
4 | % gzip -cd glib-2.4.8.tar.gz | tar xvf - # unpack the sources |
---|
5 | % cd glib-2.4.8 # 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 | Requirements |
---|
14 | ============ |
---|
15 | |
---|
16 | GLib-2.0 requires pkg-config, which is tool for tracking the |
---|
17 | compilation flags needed for libraries. (For each library, a small .pc |
---|
18 | text file is installed in a standard location that contains the |
---|
19 | compilation flags needed for that library along with version number |
---|
20 | information.) Information about pkg-config can be found at: |
---|
21 | |
---|
22 | http://www.freedesktop.org/software/pkgconfig/ |
---|
23 | |
---|
24 | GNU make (http://www.gnu.org/software/make) is also recommended. |
---|
25 | |
---|
26 | In order to implement conversions between character sets, |
---|
27 | GLib requires an implementation of the standard iconv() routine. |
---|
28 | Most modern systems will have a suitable implementation, however |
---|
29 | many older systems lack an iconv() implementation. On such systems, |
---|
30 | you must install the libiconv library. This can be found at: |
---|
31 | |
---|
32 | http://www.gnu.org/software/libiconv/ |
---|
33 | |
---|
34 | If your system has an iconv implementation but you want to use |
---|
35 | libiconv instead, you can pass the --with-libiconv option to |
---|
36 | configure. This forces libiconv to be used. |
---|
37 | |
---|
38 | Note that if you have libiconv installed in your default include |
---|
39 | search path (for instance, in /usr/local/), but don't enable |
---|
40 | it, you will get an error while compiling GLib because the |
---|
41 | iconv.h that libiconv installs hides the system iconv. |
---|
42 | |
---|
43 | If you are using the native iconv implementation on Solaris |
---|
44 | instead of libiconv, you'll need to make sure that you have |
---|
45 | the converters between locale encodings and UTF-8 installed. |
---|
46 | At a minimum you'll need the SUNWuiu8 package. You probably |
---|
47 | should also install the SUNWciu8, SUNWhiu8, SUNWjiu8, and |
---|
48 | SUNWkiu8 packages. |
---|
49 | |
---|
50 | The native iconv on Compaq Tru64 doesn't contain support for |
---|
51 | UTF-8, so you'll need to use GNU libiconv instead. (When |
---|
52 | using GNU libiconv for GLib, you'll need to use GNU libiconv |
---|
53 | for GNU gettext as well.) This probably applies to related |
---|
54 | operating systems as well. |
---|
55 | |
---|
56 | Finally, for message catalog handling, GLib requires an implementation |
---|
57 | of gettext(). If your system doesn't provide this functionality, |
---|
58 | you should use the libintl library from the GNU gettext package, |
---|
59 | available from: |
---|
60 | |
---|
61 | http://www.gnu.org/software/gettext/ |
---|
62 | |
---|
63 | The Nitty-Gritty |
---|
64 | ================ |
---|
65 | |
---|
66 | Complete information about installing GLib can be found |
---|
67 | in the file: |
---|
68 | |
---|
69 | docs/reference/glib/html/glib-building.html |
---|
70 | |
---|
71 | Or online at: |
---|
72 | |
---|
73 | http://developer.gnome.org/doc/API/2.0/glib/glib-building.html |
---|
74 | |
---|
75 | |
---|
76 | Installation directories |
---|
77 | ======================== |
---|
78 | |
---|
79 | The location of the installed files is determined by the --prefix |
---|
80 | and --exec-prefix options given to configure. There are also more |
---|
81 | detailed flags to control individual directories. However, the |
---|
82 | use of these flags is not tested. |
---|
83 | |
---|
84 | One particular detail to note, is that the architecture-dependent |
---|
85 | include file glibconfig.h is installed in: |
---|
86 | |
---|
87 | $exec_prefix/lib/glib/include/ |
---|
88 | |
---|
89 | if you have a version in $prefix/include, this is out of date |
---|
90 | and should be deleted. |
---|
91 | |
---|
92 | .pc files for the various libraries are installed in |
---|
93 | $exec_prefix/lib/pkgconfig to provide information when compiling |
---|
94 | other packages that depend on GLib. If you set PKG_CONFIG_PATH |
---|
95 | so that it points to this directory, then you can get the |
---|
96 | correct include flags and library flags for compiling a GLib |
---|
97 | application with: |
---|
98 | |
---|
99 | pkg-config --cflags glib-2.0 |
---|
100 | pkg-config --libs glib-2.0 |
---|
101 | |
---|
102 | |
---|
103 | Cross-compiling GLib |
---|
104 | ==================== |
---|
105 | |
---|
106 | Information about cross-compilation of GLib can be found |
---|
107 | in the file: |
---|
108 | |
---|
109 | docs/reference/glib/html/glib-cross-compiling.html |
---|
110 | |
---|
111 | Or online at: |
---|