]> Pileus Git - ~andy/gtk/blob - INSTALL
New question re memory leaks.
[~andy/gtk] / INSTALL
1 Prerequisites
2 =============
3
4 GTK+ requires the following packages:
5
6  - The GLIB library, available at the same location as GTK+
7
8  - The Pango library, available from:
9
10       http://www.pango.org/download.shtml
11
12  - The TIFF, PNG, and JPEG image loading libraries. You most
13    likely have these installed on your system already. If not
14    these libraries are available from:
15
16     http://www.libtiff.org/
17     http://www.libpng.org/
18     ftp://ftp.uu.net/graphics/jpeg/
19
20    If these libraries are not available, the corresponding 
21    image loaders will simply not be built. However, this
22    may cause applications using GTK+ not to function properly.
23
24 Simple install procedure
25 ========================
26
27   % gzip -cd gtk+-1.3.2.tar.gz | tar xvf - # unpack the sources
28   % cd gtk+-1.3.2                          # change to the toplevel directory
29   % ./configure                            # run the `configure' script
30   % make                                   # build GTK
31   [ Become root if necessary ]
32   % make install                           # install GTK
33
34 The Nitty-Gritty
35 ================
36
37 The 'configure' script can be given a number of options to enable
38 and disable various features. For a complete list, type:
39
40   ./configure --help
41
42 A few of the more important ones:
43
44 *  --prefix=PREFIX         install architecture-independent files in PREFIX
45                            [ Defaults to /usr/local ]
46
47 *  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
48                            [ Defaults to the value given to --prefix ]
49
50 *  --with-xinput=[no/gxi/xfree] support XInput [default=no]
51
52 The --with-xinput flag specifies whether to compile with support
53 for the XInput extension (mainly used for graphics tablets), and
54 which form of support to use:
55
56   no    : no support 
57   gxi   : Use generic XInput support
58   xfree : Use special features in the Wacom drivers in XFree86 3.3.1
59           and later.
60
61 For more information, follow the link from http://www.gtk.org
62
63 *  --disable-nls           do not use Native Language Support
64
65 If this flag is not specified, GTK+ will try to find
66 and use the gettext() set of functions to provide translations
67 of the strings in the standard dialogs into the
68 user's native language.
69
70 *  --enable-xim            support XIM [default=yes]
71
72 Specifying --disable-xim will disable support for entering
73 internationalized text using X Input Methods. This will give some
74 slight savings in speed and memory use and might be necessary
75 with older versions of X.
76
77 *  --with-locale=LOCALE    locale name you want to use
78
79 The --with-locale options is used to determine if your operating
80 system has support for the locale you will be using. If not, X's
81 built in locale support will be used.
82
83 Because of bugs in autoconf, it is necessary to specify this
84 option even if your LANG environment variable is correctly set.
85
86 This option does not determine which locale GTK will use at
87 runtime. That will be determined from the usual environment
88 variables.  If you will be using multiple locales with GTK,
89 specify the one for which your operating system has the worst
90 support for the --with-locale option.
91
92
93 Options can be given to the compiler and linker by setting
94 environment variables before running configure. A few of the more
95 important ones:
96
97  CC       : The C compiler to use
98  CPPFLAGS : Flags for the C preprocesser such as -I and -D
99  CFLAGS   : C compiler flags
100
101 The most important use of this is to set the
102 optimization/debugging flags. For instance, to compile with no
103 debugging information at all, run configure as:
104
105  CFLAGS=-O2 ./configure           # Bourne compatible shells (sh/bash/zsh)
106
107 or,
108
109  setenv CFLAGS -O2 ; ./configure  # csh and variants
110
111 Native-Language Support and gettext()
112 =====================================
113
114 To provide native-language support (NLS) GTK+ uses the
115 gettext() set of functions. These functions are found
116 in the C library on many systems, such as the Solaris
117 C library and the GNU C Library, version 2.
118
119 If your C library does not provide the necessary functionality,
120 you may wish to install the GNU gettext package. You'll
121 need version 0.10.35 or better. Version 0.10.35 is
122 available from ftp://alpha.gnu.org/pub/gnu
123
124 Generally, GTK+ will properly detect what is installed
125 on your system and enable or disable NLS as appropriate.
126 However, in rare cases, it may be necessary to disable
127 NLS manually to get GTK+ to compile. You can do this
128 by specifying the --disable-nls flag when configuring
129 GTK+.
130
131 Using an uninstalled copy of GLIB [ Unsupported ]
132 =================================================
133
134 You can compile GTK+ against a copy of GLIB that you have not
135 yet installed. To do this, give the --with-glib=DIR options
136 to ./configure. For instance:
137
138  ./configure --with-glib=../glib-1.3.2
139
140 This, however, will not work if you built GLIB with different
141 source and build directories.
142
143 It is recommended that you install GLIB before compiling
144 GTK+. The --with-glib option is not regularly tested
145 and may not function correctly. In addition, 
146 inter-library dependencies won't be generated when
147 using --with-glib=.
148
149 Installation directories
150 ========================
151
152 The location of the installed files is determined by the --prefix
153 and --exec-prefix options given to configure. There are also more
154 detailed flags to control individual directories. However, the
155 use of these flags is not tested.
156
157 One particular detail to note, is that the architecture-dependent
158 include file glibconfig.h is installed in:
159
160   $exec_pref/lib/glib/include/
161
162 if you have a version in $prefix/include, this is out of date
163 and should be deleted.
164
165 A shell script gtk-config is created during the configure
166 process, and installed in the bin/ directory
167 ($exec_prefix/bin). This is used to determine the location of GTK
168 when building applications.  If you move GTK after installation,
169 it will be necessary to edit this file.
170
171 For complete details, see the file docs/gtk-config.txt
172
173
174 Notes for using XIM support for Japanese input
175 ==============================================
176
177 * There is a bug in older versions of kinput2 that will cause GTK+
178 to hang when destroying a text entry. The latest versions of
179 kinput is available from:
180
181   ftp://ftp.sra.co.jp/pub/x11/kinput2
182
183 * The locale information file for the ja_JP EUC locale
184 distributed with some recent versions of X11 specifies to use the
185 C library multibyte functions. Unless your C library has support
186 for Japanese locales, this is incorrect, and will cause problems
187 for GTK's internationalization.
188
189 (In particular, this occurs with GNU libc 2.0 in which
190 the multibyte functions always translate to and from UTF-8; but
191 the problem may occur for other C libraries, and other operating
192 systems as well.)
193
194 To fix this, change the line:
195
196 use_stdc_env            True
197
198 to 
199
200 use_stdc_env            False
201
202 in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
203
204