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