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