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