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