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