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