]> Pileus Git - ~andy/gtk/blob - INSTALL
2cfefd874917644b2edb520731e6530c072763b0
[~andy/gtk] / INSTALL
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.1.2.tar.gz | tar xvf - # unpack the sources
11   % cd gtk+-1.1.2                          # 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 *  --enable-xim            support XIM [default=yes]
47
48 Specifying --disable-xim will disable support for entering
49 internationalized text using X Input Methods. This will give some
50 slight savings in speed and memory use and might be necessary
51 with older versions of X.
52
53 *  --with-locale=LOCALE   locale name you want to use
54
55 The --with-locale options is used to determine if your operating
56 system has support for the locale you will be using. If not, X's
57 built in locale support will be used.
58
59 Because of bugs in autoconf, it is necessary to specify this
60 option even if your LANG environment variable is correctly set.
61
62 This option does not determine which locale GTK will use at
63 runtime. That will be determined from the usual environment
64 variables.  If you will be using multiple locales with GTK,
65 specify the one for which your operating system has the worst
66 support for the --with-locale option.
67
68
69 Options can be given to the compiler and linker by setting
70 environment variables before running configure. A few of the more
71 important ones:
72
73  CC       : The C compiler to use
74  CPPFLAGS : Flags for the C preprocesser such as -I and -D
75  CFLAGS   : C compiler flags
76
77 The most important use of this is to set the
78 optimization/debugging flags. For instance, to compile with no
79 debugging information at all, run configure as:
80
81  CFLAGS=-O2 ./configure           # Bourne compatible shells (sh/bash/zsh)
82
83 or,
84
85  setenv CFLAGS -O2 ; ./configure  # csh and variants
86
87
88 Using an uninstalled copy of GLIB
89 =================================
90
91 You can compile GTK+ against a copy of GLIB that you have not
92 yet installed. To do this, give the --with-glib=DIR options
93 to ./configure. For instance:
94
95  ./configure --with-glib=../glib-1.1.3
96
97 This, however, will not work if you built GLIB with different
98 source and build directories.
99
100
101 Installation directories
102 ========================
103
104 The location of the installed files is determined by the --prefix
105 and --exec-prefix options given to configure. There are also more
106 detailed flags to control individual directories. However, the
107 use of these flags is not tested.
108
109 One particular detail to note, is that the architecture-dependent
110 include file glibconfig.h is installed in:
111
112   $exec_pref/lib/glib/include/
113
114 if you have a version in $prefix/include, this is out of date
115 and should be deleted.
116
117 A shell script gtk-config is created during the configure
118 process, and installed in the bin/ directory
119 ($exec_prefix/bin). This is used to determine the location of GTK
120 when building applications.  If you move GTK after installation,
121 it will be necessary to edit this file.
122
123 For complete details, see the file docs/gtk-config.txt
124
125
126 Notes for using XIM support for Japanese input
127 ==============================================
128
129 * There is a bug in older versions of kinput2 that will cause GTK
130 to hang when destroying a text entry. The latest versions of
131 kinput is available from:
132
133   ftp://ftp.sra.co.jp/pub/x11/kinput2
134
135 * The locale information file for the ja_JP EUC locale
136 distributed with some recent versions of X11 specifies to use the
137 C library multibyte functions. Unless your C library has support
138 for Japanese locales, this is incorrect, and will cause problems
139 for GTK's internationalization.
140
141 (In particular, this occurs with GNU libc 2.0 and 2.1, in which
142 the multibyte functions always translate to and from UTF-8; but
143 the problem may occur for other C libraries, and other operating
144 systems as well.)
145
146 To fix this, change the line:
147
148 use_stdc_env            True
149
150 to 
151
152 use_stdc_env            False
153
154 in the file /usr/X11R6/lib/X11/locale/ja_JP/XLC_LOCALE.
155
156