]> Pileus Git - ~andy/gtk/blob - INSTALL.in
Don't put -lgthread in GLIB_LIBS, GLIB_DEPLIBS
[~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   xfree : Use special features in the Wacom drivers in XFree86 3.3.1
62           and later.
63   gxi   : Use generic XInput support (not recommended)
64
65 The XInput support is not known to work with any other XServer than
66 XFree86. For more information about XInput, see:
67
68  http://www.gtk.org/~otaylor/xinput/howto/index.html
69  http://www.lepied.com/xfree86/
70
71 *  --disable-nls           do not use Native Language Support
72
73 If this flag is not specified, GTK+ will try to find
74 and use the gettext() set of functions to provide translations
75 of the strings in the standard dialogs into the
76 user's native language.
77
78 *  --enable-xim            support XIM [default=yes]
79
80 Specifying --disable-xim will disable support for entering
81 internationalized text using X Input Methods. This will give some
82 slight savings in speed and memory use and might be necessary
83 with older versions of X.
84
85 *  --with-locale=LOCALE    locale name you want to use
86
87 The --with-locale options is used to determine if your operating
88 system has support for the locale you will be using. If not, X's
89 built in locale support will be used.
90
91 Because of bugs in autoconf, it is necessary to specify this
92 option even if your LANG environment variable is correctly set.
93
94 This option does not determine which locale GTK will use at
95 runtime. That will be determined from the usual environment
96 variables.  If you will be using multiple locales with GTK,
97 specify the one for which your operating system has the worst
98 support for the --with-locale option.
99
100
101 Options can be given to the compiler and linker by setting
102 environment variables before running configure. A few of the more
103 important ones:
104
105  CC       : The C compiler to use
106  CPPFLAGS : Flags for the C preprocesser such as -I and -D
107  CFLAGS   : C compiler flags
108
109 The most important use of this is to set the
110 optimization/debugging flags. For instance, to compile with no
111 debugging information at all, run configure as:
112
113  CFLAGS=-O2 ./configure           # Bourne compatible shells (sh/bash/zsh)
114
115 or,
116
117  setenv CFLAGS -O2 ; ./configure  # csh and variants
118
119 Native-Language Support and gettext()
120 =====================================
121
122 To provide native-language support (NLS) GTK+ uses the
123 gettext() set of functions. These functions are found
124 in the C library on many systems, such as the Solaris
125 C library and the GNU C Library, version 2.
126
127 If your C library does not provide the necessary functionality,
128 you may wish to install the GNU gettext package. You'll
129 need version 0.10.35 or better. Version 0.10.35 is
130 available from ftp://alpha.gnu.org/pub/gnu
131
132 Generally, GTK+ will properly detect what is installed
133 on your system and enable or disable NLS as appropriate.
134 However, in rare cases, it may be necessary to disable
135 NLS manually to get GTK+ to compile. You can do this
136 by specifying the --disable-nls flag when configuring
137 GTK+.
138
139 Installation directories
140 ========================
141
142 The location of the installed files is determined by the --prefix
143 and --exec-prefix options given to configure. There are also more
144 detailed flags to control individual directories. However, the
145 use of these flags is not tested.
146
147 One particular detail to note, is that the architecture-dependent
148 include file glibconfig.h is installed in:
149
150   $exec_pref/lib/glib/include/
151
152 if you have a version in $prefix/include, this is out of date
153 and should be deleted.
154
155 A shell script gtk-config is created during the configure
156 process, and installed in the bin/ directory
157 ($exec_prefix/bin). This is used to determine the location of GTK
158 when building applications.  If you move GTK after installation,
159 it will be necessary to edit this file.
160
161 For complete details, see the file docs/gtk-config.txt
162
163
164 Notes for using XIM support for Japanese input
165 ==============================================
166
167 * There is a bug in older versions of kinput2 that will cause GTK+
168 to hang when destroying a text entry. The latest versions of
169 kinput is available from:
170
171   ftp://ftp.sra.co.jp/pub/x11/kinput2
172
173 * The locale information file for the ja_JP EUC locale
174 distributed with some recent versions of X11 specifies to use the
175 C library multibyte functions. Unless your C library has support
176 for Japanese locales, this is incorrect, and will cause problems
177 for GTK's internationalization.
178
179 (In particular, this occurs with GNU libc 2.0 in which
180 the multibyte functions always translate to and from UTF-8; but
181 the problem may occur for other C libraries, and other operating
182 systems as well.)
183
184 To fix this, change the line:
185
186 use_stdc_env            True
187
188 to 
189
190 use_stdc_env            False
191
192 in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
193
194