1/* 2 * INSTALL 3 */ 4 5 This is the environment for installation of Canna. You need 6imake on X11R6 to compile Canna. 7 8-1. Quick Install 9 10 If you have no time to read this document and you use the 11 default environment for installation, then you run as follows. 12 Canna will be installed in /usr/local/canna. 13 14 (1) When your machine is OS/2, first, see Appendix A. 15 16 (2) Run as follows: 17 18 % xmkmf 19 % make canna 20 % su 21 # make install 22 # make install.man 23 24 When there will be some errors, see the following. If you 25 cannot become super user, then see "5. Compilation and Installation 26 of Canna when you cannot become super user". 27 280. Overview 29 30 Show configuration of environment for Canna as follows: 31 32 1. Preparations 33 2. Compile Canna 34 3. Install Canna 35 4. How to Use Canna 36 5. Compilation and Installation of Canna when you cannot become 37 super user 38 39 If you have any problem to compile Canna, mail to 40 canna-dev@lists.sourceforge.jp. Please report detailed errors. 41 42 There are thee mailing lists. 43 44 * Canna@nec.co.jp (users mailing list) 45 For more information, see: 46 http://www.nec.co.jp/canna/c-mail.html 47 48 * canna-dev@lists.sourceforge.jp (developers mailing list) 49 * canna-cvs@lists.sourceforge.jp (cvs commitlog list) 50 Mailman interface is available at: 51 http://sourceforge.jp/mail/?group_id=285 52 53 Canna which contributed on X11R5 is Version 1.2. 54 55 For changes from previous versions, see CHANGES.jp. (Sorry, but 56 CHANGES.jp is in Japanese.) 57 581. Preparations 59 601.1 Configure the Environment in Canna.conf 61 62 For compilation and installation of Canna, configure the 63 following environment in Canna.conf. 64 65 cannaBinDir Directory to install commands. 66 67 cannaSrvDir Directory to install cannaserver and cannakill. 68 69 cannaLibDir Directory to install files for Canna. 70 71 cannaManDir Directory to install documents. 72 73 cannaIncDir Directory to install include file. 74 75 libCannaDir Directory to install libraries such as 76 libcanna etc. 77 78 ErrDir Directory to put log file. 79 80 cannaOwner Owner of dictionaries and kana-to-kanji 81 server. See 4.1. 82 83 cannaGroup Group of dictionaries and kana-to-kanji 84 server. See 4.1. 85 86 cannaDsoRev Revision of shared library. Here is 1 when 87 *.so.1. 88 89 sharedLibExtension Extension of shared library. Generally, here 90 is so.1. On HP-UX, here is s1. 91 92 DicDir Directory to install dictionaries. 93 94 pubdicDir Directory of Pubdic+. Pubdic+ offers the newest 95 dictionaries. In case you want to use Pubdic+, 96 you should specify this parameter. In this 97 case, you must make iroha.t in the specified 98 directory before you start to make Canna. 99 100 JAPNESEMAN Which document install, Japanese or English. 101 According to definition of this parameter, 102 result of make is different. Sorry, but 103 English documents are not complete. 104 105 USE_OBSOLETE_STYLE_FILENAME 106 107 If you want to use the obsolete styles of 108 filename as Canna 3.4 has offered, define this 109 parameter. After version 3.5, several file 110 extentions are changed as following: 111 112 File Before v3.4 After v3.5 113 -------------------------------------------- 114 Romaji-to-Kana table *.kp *.cbp 115 Binary dictionary *.d *.cbd 116 Text dictionary *.t *.ctd 117 Leaning dictionary *.fq *.cld 118 119 SupportOldWchar If you got compile errors related to wchar_t 120 define this to 0. Otherwise, leave this 1. 121 Read INSTALL.jp for detail. 122 123 UseInet6 Support IPv6 or not. Your operating system 124 needs newer IPv6 implementation. 125 126 DIC_3_6_COMPAT Create dictionaries which are compatible with 127 Canna 3.6 or earlier. You can create old 128 dictionary by "mkbindic -c 3.0" whether you 129 specify DIC_3_6_COMPAT or not. 130 131 ModernElfLink This is an experimental option. Leave it NO unless 132 you know what you are doing. Read INSTALL.jp for 133 detail. 134 135 136 For example, the default setting is: 137 138 /* #define InstallAsUser */ 139 /* #define ObsoleteInstallDir */ 140 cannaPrefix = DefCannaPrefix 141 cannaExecPrefix = $(cannaPrefix) 142 cannaBinDir = $(cannaExecPrefix)/bin 143 cannaSrvDir = DefCannaSrvDir 144 XCOMM cannaLibDir = /var/lib/canna 145 XCOMM cannaLibDir = /var/db/canna 146 cannaLibDir = DefCannaLibDir 147 XCOMM cannaManDir = $(cannaPrefix)/share/man 148 cannaManDir = $(cannaPrefix)/man 149 cannaIncDir = $(cannaPrefix)/include/canna 150 151 libCannaDir = DefLibCannaDir 152 ErrDir = DefErrDir 153 #define SupportOldWchar 1 154 #define UseInet6 0 155 /* #define DIC_3_6_COMPAT */ 156 #define ModernElfLink NO 157 cannaOwner = bin 158 cannaGroup = bin 159 DicDir = $(cannaLibDir)/dic 160 #define JAPANESEMAN 161 pubdicDir = $(CANNAROOT)/dic/ideo/pubdic 162 163 1642. Compile Canna 165 166 Canna is compiled and installed with Imakefile on X11. 167 Imakefile is a Makefile which does not depend on machine. Imake, it 168 is a program, creates Makefile for your machine from Imakefile. You 169 need imake (or xmkmf, it is a shell script to call imake) when 170 compile a software based on X11. Because of this, we advice to 171 install imake if you didn't install it. 172 173 Here, we assume that you installed imake. 174 175 When you have the environment for imake, enter the following. 176 177 xmkmf 178 make canna 179 180 In the first line, you will have new Makefile which based on 181 parameter of Canna.conf on the top directory. 182 183 In the second line, it will do the following: 184 185 (1) make Makefiles 186 187 Create new makefiles from Imakefile in all subdirectories. 188 189 (2) make clean 190 191 Clear all of the directories. 192 193 (3) make includes 194 195 Link each header files in the directory include, generate 196 header files such as accanna.h, and construct the directory 197 hierarchy. Especially "configure" script runs to create 198 "accanna.h". 199 To onstruct directory hierarchy you need a program 200 "mkdirhier". If you cannot find mkdirhier in $(BINDIR) 201 (normally points to /usr/X11R6/bin), then install it in 202 $(BINDIR). It is found in xc/config/util (or xc/util) on 203 distribution of X11. 204 205 (4) make depend 206 207 Reflect the relationship of files in each directories to 208 Makefile. Additionally, run yacc and lex, and make symbolic 209 link files. Here, you need the program makedepend. If you 210 don't have makedepend, then install it. It is found in 211 xc/config (or xc/util) on distribution of X11. 212 213 (5) make 214 215 Compile programs. 216 217 If configure fails in some reason, you can rerun it by "make 218 reconfig". 219 220 2213. Install Canna 222 2233.1 Set up the Communication Environment 224 225 Set up the port number to communicate between a kana-to-kanji 226 conversion server and clients. Add the following line in 227 /etc/services. 228 229 canna 5680/tcp 230 231 (If you use NIS, add the line in database on master server.) 232 233 If you have used Canna for a long time, you find the following 234 line in /etc/services. In this case, leave the line and add the 235 above line in the file. 236 237 iroha 5680/tcp 238 2393.2 Installation 240 241 For installation of Canna, run any one of following commands in 242 top directory of Canna's sources. 243 244 (1) make install 245 246 Install from (3) to (5) below. 247 248 (2) make install.man 249 250 Install the documents of each command in $(cannaManDir). 251 252 (3) make instserver 253 254 Install the kana-to-kanji conversion server and its 255 environment. 256 257 (4) make instclient 258 259 Install the clients of Canna and its environment. 260 261 (5) make instsgs 262 263 Install the libraries, the header files and so on to compile 264 Canna. 265 266 (6) make instmost 267 268 Install everything except dictionaries. 269 270 Install in each directories specified in Canna.conf. 271 2723.3 Configuration of Directories 273 274 Below, I would like to describe the configuration of Canna's 275 sources. 276 277 -+ lib ----+- RK Library of kana-to-kanji conversion engine 278 | +- RKC Library to communicate with kana-to-kanji 279 | | conversion server 280 | +- RKindep Internal library which does not depend on 281 | | RK layer 282 | +- canna Library for clients 283 | | 284 | +- RKC16 -+ 285 | +- canna16-+Libraries which wchar_t defined 16bits 286 | 287 | These libraries are installed in $(libCannaDir). 288 | 289 + server Directory of kana-to-kanji conversion server. 290 | The server is installed in $(cannaSrvDir). 291 | 292 + canna The header files 293 | 294 + cmd ----+* The commands. 295 | These are installed in $(cannaBinDir). 296 | 297 + ccustom Editor for customization. You can customize 298 | without knowledge of lisp language. 299 | 300 + dic ----+ ideo The kana-to-kanji conversion dictionaries 301 | + phono The romaji-to-kana conversion rules 302 | 303 | These are installed in $(DicDir). 304 | 305 + canuum Uum (Japanese input front-end processor) for Canna 306 | 307 + misc Other files 308 | 309 + doc Documents 310 3113.4 Other Files 312 313 (1) Log file 314 315 The kana-to-kanji conversion server outputs error messages in a 316 log file. You can find the log file in directory which specified as 317 $(ErrDir), and it will be named "CANNA0msgs". The default file is: 318 319 /var/log/CANNA0msgs 320 321 3224. How to Use Canna 323 3244.1 Owner or Group for Sever and Dictionaries 325 326 You should restrict the access of others to keep your 327 dictionaries safety. It is advisable to create a user/group by the 328 name of "canna" and set the ownership of your dictionaries to 329 prevent unauthorized access. 330 331 At this time, for the cannaserver can read, write the 332 dictionaries, allow read, write by owner and group to the respective 333 directories and files of dictionaries. Next, take away others' 334 permissions. Then start cannaserver with root privilege and have 335 it run as "canna" user by specifying "-u canna". 336 337 By default, owner and group of Canna's dictionaries are "bin". 338 339 Set owner and group of your dictionaries or cannaserver to the 340 parameter $(cannaOwner) and $(cannaGroup) in Canna.conf. 341 342 Below, we assume you set owner and group to bin. 343 3444.2 Start Kana-to-kanji Conversion Server 345 346 Enter the following command to start kana-to-kanji conversion 347 server as super user. 348 349 # cannaserver -u bin 350 351 If you want to start it automatically each time the UNIX system 352 is started, set to start cannaserver in the starting script(ex. 353 /etc/rc.local, etc.). You should remove its socket when start 354 cannaserver since cannaserver cannot be started when the stale 355 socket exists. 356 357 Refer to the sample startup script misc/rc.canna for details, 358 which will be made by compiling the program following the steps 359 described in section 2. 360 3614.3 Stop Kana-to-kanji Conversion Server 362 363 Enter the following command to stop kana-to-kanji conversion 364 server. 365 366 # cannakill 367 368 The cannaserver save a part of information of dictionaries on 369 memory. So you should run cannakill when you stop kana-to-kanji 370 conversion server. If you kill cannaserver directly with SIGKILL, 371 etc., you may lost the information on memory. 372 373 If you want to stop it automatically each time the UNIX system 374 is stopped, set to stop cannaserver in the shutdown script. 375 3764.4 Dictionaries 377 378 (1) Kana-to-kanji conversion dictionaries 379 380 We call the directory "dic home directory" in which there are 381 kana-to-kanji conversion dictionaries. This directory is 382 specified as $(DicDir) or specified in command line as follow: 383 384 ex.) In case you specify "dic home directory" to 385 /var/lib/canna/dic 386 387 # cannaserver /var/lib/canna/dic 388 389 Below, we show the configuration of "dic home directory". 390 391 -+-- *.cbp Romaji-to-kana conversion rules 392 | 393 +-- canna Directory of your own system's dictionaries 394 | 395 +-- user/* Directory of user's dictionaries 396 | 397 +-- group/* Directory of group's dictionaries 398 399 Allow cannaserver to read and write dic home directory, any 400 subdirectories and any files in there. (See 4.1.) 401 402 (2) Romaji-to-kana conversion rules 403 404 In default, cannaserver searches romaji-to-kana conversion 405 rules in /usr/local/canna/share/dic. If you want to use another 406 file as romaji-to-kana conversion rules, you should specify the 407 file in your own customization file "$HOME/.canna", the full 408 path must be given. 409 4104.5 Initialize(Customization) File 411 412 In Canna, each user can have a own initialize(customization) 413 file. You can set your own environment to input Japanese easily by 414 editing the file. You can specify key bindings, romaji-to-kana 415 conversion rules, kana-to-kanji conversion dictionaries, etc. 416 4175. Compilation and Installation of Canna when you cannot become super 418 user 419 420 You are able to compile and install as following when you 421 cannot become super user. 422 4235.1 Configure the Environment in Canna.conf 424 425 Specify the directories in which installed commands and 426 dictionaries to your own directories. And, specify owner and group 427 of cannaserver to your own. For example, as follows: 428 429 #define InstallAsUser 430 cannaPrefix = /home/kon/canna 431 ... 432 cannaOwner = kon 433 cannaGroup = user 434 4355.2 Compilation and Installation 436 437 In case imake on X11R6 is installed on your machine, enter the 438 following commands to compile and install Canna. 439 440 xmkmf 441 make canna 442 make install 443 make install.man 444 445 If you are able to get the sources of X11R6, although 446 X11R6 was not installed on your machine, you should get xc/config of 447 the source from X11R6, and run make in config. 448 449 For compilation in config and subdirectories, compile as 450 following after rewriting BOOTSTRAPFLAG in config/cf/Makefile.ini 451 according to your machine. 452 453 make -f Makefile.ini 454 455 We use mkdirhier command to make canna. But this command is 456 specified $(BINDIR) of X11. To clear this problem, edit a suitable 457 file in config, or specify in Canna.conf as follow: 458 459 BINDIR=/home/kon/xutil 460 461 When finish, run imake as following in the top directory which 462 you compile Canna (there is Canna.conf in the directory). 463 464 ex.) 465 % ../xc/config/imake/imake -I../xc/config/cf -DTOPDIR-=../xc/config \ 466 -DCURDIR=../Canna35 467 468 And run follows: 469 470 % make Makefile 471 % make canna 472 % make install 473 % make install.man 474 4755.3 Set up the Communication Environment 476 477 You aren't able to rewrite /etc/services if you cannot become 478 super user. But you can run cannaserver and use libraries with port 479 number 5680 without the description in /etc/services. In this case, 480 cannaserver output warning messages in log file each time 481 cannaserver is started. 482 483Appendix A. Notes on Each OS 484 485A.1 OS/2 (This discription is originally written by Hiroshi Ueno.) 486 (This may be out-of-date.) 487 488 1) You need emx 0.9c or later to compile Canna. For emx 0.9c, see 489 the following ftp site. 490 491 ftp://ftp.leo.org 492 ftp://hobbes.nmsu.edu 493 494 2) You need imake of XFree86 for OS/2. For XFree86 for OS/2, see 495 the following URL. 496 497 http://borneo.gmd.de/~veit/os2/xf86os2.html 498 499 In case of XFree86 for OS/2 3.2, you must install XF32base.zip 500 and XF32prog.zip at least. 501 502 3) Add x:\XFree86\bin to the environment variable PATH (x: is the 503 drive name which the XFree86 was installed). And you need the 504 environment variable X11ROOT. If you install XFree86 in the 505 root directory on E drive, add the following line in CONFIG.SYS. 506 507 SET X11ROOT=E: 508 509 4) Change the following files in XFree86/lib/X11/config. 510 511 os2.cf: 512 #define InstallCmd install -> #define InstallCmd ginstall 513 #define BourneShell /**/ -> #define BourneShell cmd 514 515 os2Lib.rules: 516 #define HasSharedLibraries YES -> #define HasSharedLibraries NO 517 518 5) You need sed/sort/awk/install of GNU. For this, see 519 ftp://hobbes.nmsu.edu, you can find this as one of the following 520 file names. 521 522 gnused.zip 523 gnuawk.zip 524 gnufutil.zip (include install) 525 gnututil.zip (include sort) 526 527 Rename as following for the purpose of distinction from these 528 commands on OS/2. 529 530 sort.exe -> gsort.exe 531 install.exe -> ginstall.exe 532 533 6) Set the environment in Canna.conf as below. For detail of 534 Canna.conf, see "1.1 Configure the Environment in Canna.conf". 535 536 CHOWN = echo 537 CHGRP = echo 538 CHMOD = echo 539 540 7) Enter the following. 541 542 [x:\Canna35] xmkmf 543 [x:\Canna35] x11make Makefile 544 [x:\Canna35] x11make canna 545 [x:\Canna35] x11make install 546 547 For detail, see "2. Compille Canna" and later. 548 549That's all. 550 551/* Copyright 1994 NEC Corporation, Tokyo, Japan. 552 * 553 * Permission to use, copy, modify, distribute and sell this software 554 * and its documentation for any purpose is hereby granted without 555 * fee, provided that the above copyright notice appear in all copies 556 * and that both that copyright notice and this permission notice 557 * appear in supporting documentation, and that the name of NEC 558 * Corporation not be used in advertising or publicity pertaining to 559 * distribution of the software without specific, written prior 560 * permission. NEC Corporation makes no representations about the 561 * suitability of this software for any purpose. It is provided "as 562 * is" without express or implied warranty. 563 * 564 * NEC CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 565 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN 566 * NO EVENT SHALL NEC CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR 567 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 568 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 569 * OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 570 * PERFORMANCE OF THIS SOFTWARE. 571 */ 572 573($Id: INSTALL,v 1.8 2003/09/25 15:24:31 aida_s Exp $) 574