*** empty log message ***
[m17n/m17n-lib.git] / README
1 This directory tree holds version 1.6.1 of the m17n library.    -*- text -*-
2
3 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4   National Institute of Advanced Industrial Science and Technology (AIST)
5   Registration Number H15PRO112
6 See the end for copying conditions.
7
8 The m17n library is a multilingual text processing library for the C
9 language.
10
11
12 (1) INSTALLATION
13
14 (1-1) From CVS working directory.
15
16 Run the script "bootstrap.sh" in this directory.  It is tested that
17 the script runs successfully with these versions of tools.
18
19                 libtool automake autoconf gettext pkg-config
20   Debian Lenny   1.5.26   1.10.1     2.61    0.17       0.22
21   Debian Sid     2.2.6b   1.11.1     2.67  0.18.1       0.25
22   Ubunto 8.4(*1) 1.5.26   1.10.1     2.61    0.17       0.22
23   Ubunto 9.10     2.2.4    1.9.6     2.61    0.17       0.22
24   Ubunto 10.4    2.2.6b   1.11.1     2.65    0.17       0.22
25   Fedra 12       2.2.6b   1.11.1     2.63    0.17       0.23
26   Fedra 13       2.2.6b   1.11.1     2.65  0.18.1       0.23
27   OpenSUSE 11.3  2.2.6b   1.11.1     2.65    0.17       0.23
28
29 (*1) bootstrap.sh prints lots of warning something like this:
30 ------------------------------------------------------------
31 autoreconf: running: aclocal --force -I m4
32 configure.ac:47: warning: AC_COMPILE_IFELSE was called \
33 before AC_USE_SYSTEM_EXTENSIONS
34 ../../lib/autoconf/specific.m4:389: AC_USE_SYSTEM_EXTENSIONS is expanded from...
35 m4/lock.m4:29: gl_LOCK_EARLY_BODY is expanded from...
36 m4/lock.m4:22: gl_LOCK_EARLY is expanded from...
37 m4/lock.m4:253: gl_LOCK is expanded from...
38 m4/intl.m4:186: gt_INTL_SUBDIR_CORE is expanded from...
39 m4/intl.m4:25: AM_INTL_SUBDIR is expanded from...
40 m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
41 configure.ac:47: the top level
42 ------------------------------------------------------------
43 but, it seems that they can be just ignored.
44
45 Then, proceed to the next step.
46
47 (1-2) From the tarball.
48
49 The m17n library utilizes these extra libraries.  It is recommended to
50 install all of them before running the "configure" script.  The script
51 will find out the existence of them automatically.
52
53         libxml2         -- http://xmlsoft.org/
54         fribidi         -- http://fribidi.sourceforge.net/
55         freetype        -- http://www.freetype.org/
56         libotf          -- http://www.m17n.org/libotf/
57         fontconfig      -- http://freedesktop.org/Software/fontconfig
58         xft             -- http://freedesktop.org/Software/Xft
59         gd              -- http://www.boutell.com/gd/
60
61 In addition, for finding a word boundary in Thai text, "configure"
62 checks the existence of these libraries (libthai is preferred):
63
64         libthai         -- http://sourceforge.net/projects/libthai
65         wordcut         -- http://thaiwordseg.sourceforge.net/
66
67 The sample program m17n-edit utilizes this Japanese inputting system.
68 It is also recommended to install it.
69
70         anthy           -- http://anthy.sourceforge.jp/
71
72 Then, type the followings on the command line.
73
74         % ./configure
75         % make
76         % make install
77
78 Note that this package assumes an ANSI C compiler such as gcc.  It
79 will not compile with an old-style K&R compiler.
80
81 The default installation path is "/usr/local".
82 Thus, these header files are installed in /usr/local/include:
83         m17n-core.h, m17n.h, m17n-gui.h, m17n-err.h, m17n-X.h, m17n-flt.h
84
85 These library files are installed in /usr/local/lib:
86         libm17n-core.{a,so*,la}
87         libm17n.{a,so*,la}
88         libm17n-gui.{a,so*,la}
89         libm17n-flt.{a,so*,la}
90
91 These modules are installed in /usr/local/lib/m17n/1.0:
92         libm17n-X.{a,so*,la}
93         libm17n-gd.{a,so*,la}
94         libimx-anthy.{a,so*,la},
95         libimx-ispell.{a,so*,la},
96
97 This shell script is installed in /usr/local/bin:
98         m17n-config
99
100 These pkgconfig metadata files are installed in
101 /usr/local/lib/pkgconfig:
102         m17n-core.pc, m17n-shell.pc, m17n-flt.pc, m17n-gui.pc
103
104 These sample programs are installed in /usr/local/bin too:
105         m17n-conv, m17n-date, m17n-view, m17n-dump, m17n-edit
106
107 If you don't need GUI libraries (libm17n-gui.so and etc.), you can
108 instruct the `configure' script not to build them as below:
109
110         % ./configure --without-gui
111
112 This file under `example' sub-directory is a Japanese resource file
113 for m17n-edit.  It is not installed but useful in Japanese locale.  Copy
114 it to your home directory (or, for instance,
115 /usr/X11R6/lib/X11/ja/app-defaults) and rename it to "M17NEdit" if you
116 want to see labels in Japanese:
117         M17NEdit.ja
118
119 These text files under `example' sub-directory are not installed but
120 useful for testing the rendering engine of the m17n library:
121         HELLO.utf8 HELLO.xml HELLO-ja.utf8 HELLO-ja.xml HELLO.html
122 XXX.xml are generated from XXX.utf8 by attaching text property
123 `language' and serializing.
124
125 Please read also INSTALL for the generic installation instructions.
126
127
128 (2) DATABASE
129
130 The m17n library utilizes the m17n database available at:
131         http://www.m17n.org/m17n-lib/m17n-db
132 Without this database, the m17n library loses half its value.  Please
133 install it (Ver.1.4.0 or the later is required) too before you try the
134 above sample programs or develop a program that uses the m17n library.
135
136
137 (3) DOCUMENTATION
138
139 This page has a link to full documentation of the m17n library:
140         http://www.m17n.org/m17n-lib
141
142 Actually, the documentation was generated by Doxygen using comments in
143 the source files.  There are English and Japanese comments in
144 parallel.
145
146
147 (4) USAGE
148
149 The library provides three levels of APIs, CORE, SHELL, and GUI.  For
150 CORE API, include <m17n-core.h>, for SHELL API, include <m17n.h>, and
151 for GUI API, include <m17n-gui.h >.  In addition, for those who need
152 only text shaping facility that uses FLT (Font Layout Table), the
153 library provides FLT API.  To use it, include <m17n-flt.h>.
154
155 See the documentation above, or the manual of m17nIntro(3) for more
156 detail.
157
158 The shell script "m17n-config" helps compiling and linking of a
159 program that uses the m17n library.  For instance this compiles PROG.c
160 that uses SHELL API and builds executable PROG.
161
162         % gcc -o PROG `m17n-config --cflags` `m17n-config --libs` PROG.c
163
164 This compiles PROX.c that uses GUI API and builds executable PROX.
165
166         % gcc -o PROX `m17n-config GUI --cflags` `m17n-config GUI --libs` PROX.c
167
168
169 ----------------------------------------------------------------------
170 Copyright information
171
172 Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
173   National Institute of Advanced Industrial Science and Technology (AIST)
174   Registration Number H15PRO112
175
176 This file is part of the m17n library.
177
178 The m17n library is free software; you can redistribute it and/or
179 modify it under the terms of the GNU Lesser General Public License
180 as published by the Free Software Foundation; either version 2.1 of
181 the License, or (at your option) any later version.
182
183 The m17n library is distributed in the hope that it will be useful,
184 but WITHOUT ANY WARRANTY; without even the implied warranty of
185 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
186 Lesser General Public License for more details.
187
188 You should have received a copy of the GNU Lesser General Public
189 License along with the m17n library; if not, write to the Free
190 Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
191 Boston, MA 02110-1301, USA.