]> Pileus Git - ~andy/gtk/blob - INSTALL.in
Add dependency on Atk for accessibility support.
[~andy/gtk] / INSTALL.in
1 Prerequisites
2 =============
3
4 GTK+ requires the following packages:
5
6  - The GLIB, Pango, and Atk libraries, available at the same location as GTK+
7
8  - The TIFF, PNG, and JPEG image loading libraries. You most
9    likely have these installed on your system already. If not
10    these libraries are available from:
11
12     http://www.libtiff.org/
13     ftp://swrinde.nde.swri.edu/pub/png/src/
14     ftp://ftp.uu.net/graphics/jpeg/
15
16    If these libraries are not available, the corresponding 
17    image loaders will simply not be built. However, this
18    may cause applications using GTK+ not to function properly.
19
20 Simple install procedure
21 ========================
22
23   % gzip -cd gtk+-@GTK_VERSION@.tar.gz | tar xvf - # unpack the sources
24   % cd gtk+-@GTK_VERSION@                          # change to the toplevel directory
25   % ./configure                            # run the `configure' script
26   % make                                   # build GTK
27   [ Become root if necessary ]
28   % make install                           # install GTK
29
30 The Nitty-Gritty
31 ================
32
33 The 'configure' script can be given a number of options to enable
34 and disable various features. For a complete list, type:
35
36   ./configure --help
37
38 A few of the more important ones:
39
40 *  --prefix=PREFIX         install architecture-independent files in PREFIX
41                            [ Defaults to /usr/local ]
42
43 *  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
44                            [ Defaults to the value given to --prefix ]
45
46 *  --with-xinput=[no/gxi/xfree] support XInput [default=no]
47
48 The --with-xinput flag specifies whether to compile with support
49 for the XInput extension (mainly used for graphics tablets), and
50 which form of support to use:
51
52   no    : no support 
53   xfree : Use special features in the Wacom drivers in XFree86 3.3.1
54           and later.
55   gxi   : Use generic XInput support (not recommended)
56
57 The XInput support is not known to work with any other XServer than
58 XFree86. For more information about XInput, see:
59
60  http://www.gtk.org/~otaylor/xinput/howto/index.html
61  http://www.lepied.com/xfree86/
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 Installation directories
132 ========================
133
134 The location of the installed files is determined by the --prefix
135 and --exec-prefix options given to configure. There are also more
136 detailed flags to control individual directories. However, the
137 use of these flags is not tested.
138
139 One particular detail to note, is that the architecture-dependent
140 include file glibconfig.h is installed in:
141
142   $exec_pref/lib/glib/include/
143
144 if you have a version in $prefix/include, this is out of date
145 and should be deleted.
146
147 A shell script gtk-config is created during the configure
148 process, and installed in the bin/ directory
149 ($exec_prefix/bin). This is used to determine the location of GTK
150 when building applications.  If you move GTK after installation,
151 it will be necessary to edit this file.
152
153 For complete details, see the file docs/gtk-config.txt
154
155
156 Notes for using XIM support for Japanese input
157 ==============================================
158
159 * There is a bug in older versions of kinput2 that will cause GTK+
160 to hang when destroying a text entry. The latest versions of
161 kinput is available from:
162
163   ftp://ftp.sra.co.jp/pub/x11/kinput2
164
165 * The locale information file for the ja_JP EUC locale
166 distributed with some recent versions of X11 specifies to use the
167 C library multibyte functions. Unless your C library has support
168 for Japanese locales, this is incorrect, and will cause problems
169 for GTK's internationalization.
170
171 (In particular, this occurs with GNU libc 2.0 in which
172 the multibyte functions always translate to and from UTF-8; but
173 the problem may occur for other C libraries, and other operating
174 systems as well.)
175
176 To fix this, change the line:
177
178 use_stdc_env            True
179
180 to 
181
182 use_stdc_env            False
183
184 in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
185
186