forked from shirok/Gauche
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.in
573 lines (469 loc) · 20.6 KB
/
INSTALL.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
@c -*- coding: utf-8 -*-
@c JP
Gaucheのコンパイルとインストール
@c EN
Compiling and Installing Gauche
@c COMMON
@c JP
注: Gaucheは開発中のシステムで、頻繁に更新しています。次のURLで最新の
情報が得られます:
@c EN
Note: The Gauche system is a work in progress and frequently updated.
Check out the latest information on the site:
@c COMMON
http://practical-scheme.net/gauche/
@c JP
簡単な方法
@c EN
Quick Start
@c COMMON
---------------------------------------------------
% ./configure
% make
% make check
% make install
@c JP
これで、Gaucheシステムが /usr/local/bin, /usr/local/lib/gauche及び
/usr/local/share/gauche以下にインストールされます。
@c EN
Things will be installed under /usr/local/bin, /usr/local/lib/gauche,
and /usr/local/share/gauche.
@c COMMON
@c JP
既にGaucheがインストールされているシステムで、
全く同じconfigurationオプションで新しいバージョンのGaucheをインストール
する場合、'configure' の代わりに次のコマンドを使うこともできます。
@c EN
If you have installed Gauche before, and want to install
new version of Gauche with the same configuration option,
you can use the following command instead of 'configure'.
@c COMMON
% gauche-config --reconfigure | sh
@c JP
'--reconfigure' オプションが与えられると、gauche-configは現在
インストールされているGaucheがconfigureされた時のコマンドラインを
標準出力に書き出します。それをシェルに評価させれば、同じオプションで
configureすることができます。Gaucheをアップデートする場合に便利です。
@c EN
When the option '--reconfigure' is given, Gauche-config prints out
the command line when it is configured. Pass the output to
shell and you can reconfigure with the same options. It is a
convenient way to update Gauche.
@c COMMON
@c JP
注: gitレポジトリの開発版HEADをコンパイルする場合は、configureを
走らせる前にいくつか準備が必要です。詳しくはHACKINGファイルを参照して
ください。
@c EN
Note: If you are compiling from development HEAD cloned from
git repository, you need extra steps before running configure.
See the file HACKING for the details.
@c COMMON
@c JP
スレッドサポート
@c EN
Thread Support
@c COMMON
---------------------------------------------------
@c JP
主要なプラットフォームの多くで、Gaucheはネイティブスレッドをサポートします。
スレッドが使用可能かどうかはconfigure時に自動判定されます。
スレッドサポートが有効かどうかはconfigureスクリプトの出力の最後に表示されます。
@c EN
On most popular platforms, Gauche supports native threads.
The configure script tries to determine automatically whether thread
support can be enabled or not. It shows at the end of the output
whether the support is enabled.
@c COMMON
@c JP
何らかの理由で、スレッドサポートが可能なプラットフォームでそれを無効にしたい場合、
あるいは本来可能であるはずなのにconfigureスクリプトが判定を間違えて有効になっていない
場合には、次のconfigureオプションで強制的にスレッドサポートの有効/無効を
切り替えることができます。
@c EN
If you want to turn off the thread support even when the platform
allows it for some reason, or if the configure script misrecognizes the
platform and does not enable the support when it should be, you can use
the following configure options to turn off or turn on the support
explicitly.
@c COMMON
--enable-threads=none ;; turn off the thread support
--enable-threads=pthreads ;; turn on the thread support (pthread)
--enable-threads=win32 ;; turn on the thread support (windows)
@c JP
文字エンコーディングの選択
@c EN
Choosing Character Encoding
@c COMMON
---------------------------------------------------
@c JP
デフォルトでは、Gaucheは内部文字エンコーディングとしてutf-8を使います。
--enable-multibyte=ENCODING というオプションをconfigureに渡すことで、
内部文字エンコーディングを変えることができます。
@c EN
By default, Gauche is compiled with utf-8 as a native character encoding.
You can give a --enable-multibyte=ENCODING option to switch the native
encoding. Note that if you want to use ISO8859-1 GR characters in
the program text, you have to specify no multibyte encoding, or
Gauche takes such characters as the first byte of multibyte charaters.
@c COMMON
--enable-multibyte=utf-8 ;; UTF-8 (default)
--enable-multibyte=euc-jp ;; EUC-JP
--enable-multibyte=sjis ;; Shift JIS
--enable-multibyte=no ;; No multibyte string
@c JP
Gaucheは代表的な日本語文字エンコーディングを認識し変換することが
できますが、それ以外のエンコーディングに関しては、iconvが利用可能で
あればそれを利用して変換を行います。
iconvが標準でインストールされていないシステムでは、
--with-iconvオプションで外部のiconvライブラリを利用することができます。
@c EN
Gauche can recognize and converts typical japanese character
encodings, but delegates other conversion work to iconv library
(when available). If your system does not have iconv installed,
you can specify the location of your external
iconv library by --with-iconv option.
@c COMMON
--with-iconv=DIR
@c JP
例えば --with-iconv=/usr/local とすれば、Gaucheはiconv.hを/usr/local/include
から、libiconvを/usr/local/libから探します。もしあなたのiconvライブラリが
libiconv以外の名前 (libmyconvとか) だったとしたら、
--with-iconv-lib=myconv というオプションも指定して下さい。
外部のiconvライブラリとしては、Bruno Haible氏のlibiconvが以下から入手可能です。
@c EN
For example, if your say --with-iconv=/usr/local, Gauche looks
for the header iconv.h from /usr/local/include and the library
libiconv from /usr/local/lib.
In case if your iconv library is named other than libiconv, say,
libmyconv, you can also specify --with-iconv-lib=myconv to tell
Gauche to link against the library.
You can obtain Bruno Haible's libiconv library from here:
@c COMMON
http://www.gnu.org/software/libiconv/
@c JP
ローカルライブラリパス
@c EN
Local library paths
@c COMMON
---------------------------------------------------
@c JP
Gaucheのビルドに、標準でない場所にインストールされているライブラリを
使用したい場合、次のオプションでその場所を指定することができます。
--with-local=PATH:PATH2:...
これで、PATH/include、PATH2/include、... がインクルードパスに、
PATH/lib、PATH2/lib、... がライブラリサーチパスに追加されます。
例えば、/usr/localにインストールされたgdbmライブラリを使用したい
場合は次のようにします。
--with-local=/usr/local
@c EN
If you want to use some libraries installed in non-standard location
to build Gauche, you can use the following option to specify the
locations.
--with-local=PATH:PATH2:...
This addts PATH/include, PATH2/include, ... to the include paths,
and PATH/lib, PATH2/lib, ... to the library search paths.
For example, if you want to use gdbm library in /usr/local,
you can say:
--with-local=/usr/local
@c COMMON
@c JP
IPv6サポート
@c EN
IPv6 support
@c COMMON
---------------------------------------------------
@c JP
Gaucheは実験的にIPv6をサポートしています。デフォルトではこの機能はoffに
なっていますが、次のconfigureオプションで有効にすることができます。
@c EN
Gauche has experimental support for IPv6.
It is turned off by default,
but you can include it by giving the following configure option.
@c COMMON
--enable-ipv6
@c JP
もちろん、OSでIPv6がサポートされていなければなりません。
現在の実装はFreeBSDおよびLinux上でテストされています。
詳しい機能はリファレンスマニュアルのgauche.netの項を参照して下さい。
@c EN
Of course your OS has to have the support of IPv6.
The current implementation is tested on FreeBSD and Linux.
See the gauche.net section of the reference manual for details.
@c COMMON
@c JP
TLS/SSL のサポート
@c EN
TLS/SSL support
@c COMMON
---------------------------------------------------
@c JP
Gaucheにはセキュアソケット通信のサポートが組み込まれています。デフォルトで
この機能はONになっていますが、もしext/tlsのビルドがうまく行かないようなら、
次のオプションで強制的にTLS/SSLサポートをoffにすることもできます。
@c EN
Gauche includes secure socket connection support.. The build process
tries to compile it by default, but if you have a problem during
building ext/tls, you can turn off TLS/SSL support.
@c COMMON
--enable-tls=none ;; do not include TLS/SSL support
--enable-tls=axtls ;; (default) include TLS/SSL support using
axTLS library (source is included in Gauche).
@c JP
SLIBの場所
@c EN
Selecting SLIB location
@c COMMON
---------------------------------------------------
@c JP
SLIBは、ポータブルなSchemeライブラリで、いろいろ便利な機能が
完全にSchemeで書かれています。GaucheはSLIBがインストールされていれば
その機能を利用することができます。
@c EN
SLIB is a portable Scheme library containing various useful functions,
entirely written in Scheme. Gauche can use SLIB features if you have
it on your system.
@c COMMON
@c JP
configureスクリプトは、/usr/local/slibなどいくつかの基本的なディレクトリ
からSLIBを自動的に探します。もしあなたのSLIBシステムが標準的ではない場所に
インストールされていたら、次のオプションでその場所を指定してください。
@c EN
The configure script tries to find where SLIB is installed. It looks
for some typical directories like /usr/local/slib or /usr/share/slib.
If you installed your SLIB in some non-standard location, you can tell
it to the configure script as follows:
@c COMMON
./configure --with-slib=PATH
@c JP
ここで、PATHはSLIBがインストールされたパスです。
@c EN
where PATH is the path you installed your SLIB.
@c COMMON
@c JP
GauchehはSLIB無しでも動作します。SLIBを使う必要がなければ、このオプションは
気にしなくてよいです。
@c EN
Gauche works without SLIB, anyway. If you're not interested, you
don't need to care about this.
@c COMMON
@c JP
SLIBは最初に使う前にGaucheのライブラリディレクトリにカタログファイルを
作成します。Gaucheのインストール時に既にSLIBが存在すればインストール
スクリプトがカタログファイルを作成しますが、Gaucheインストール後にSLIB
がインストールされた場合、最初にSLIBを使おうとした時点でカタログファイルが
作成されます。この時、Gauche使用者がライブラリディレクトリに書き込み権限を
持っていないとエラーとなります。書き込み権限を持つユーザがgoshを起動して
例えば次のような式を評価すればカタログファイルが正しく作られます。
@c EN
SLIB needs a catalog file to be created in the Gauche library
directory before use. If Gauche finds SLIB during installation,
the install procedure creates the catalog file.
If you install slib after installing Gauche, it tries to create
the catalog file when you use slib first time, and you may get
an error if you don't have a permission to write into the
Gauche library directory. Run gosh in the right permission
and evaluate something like the following will solve the problem.
@c COMMON
(use slib)
(require 'logical)
@c JP
実行時のライブラリパス
@c EN
Run-time library path
@c COMMON
---------------------------------------------------
@c JP
しばしば、環境のコントロールができない箇所でGaucheを走らせなければならない
場合があります。例えばCGIスクリプトをISPのサーバーで走らせる場合などです。
もし、Gaucheが標準的でない場所にインストールされた共有ライブラリに依存し
ている場合、それが問題となります。
例えば、最新のlibiconv.soを自分でコンパイルして /home/yours/lib に
インストールしたとします。--with-iconv=/home/yours/lib としてconfigure
すれば、Gaucheはあなたのiconvを使うようにコンパイルされます。実行時に適切
な環境変数、例えばLD_LIBRARY_PATHなどを設定しておけば、Gaucheの
インタプリタgoshはlibiconv.soを捜し出すことができます。しかし、
CGIスクリプトはWeb serverによって起動され、Web serverはLD_LIBRARY_PATH
を設定してくれないかもしれません。その場合、goshはlibiconv.soが見つけられずに
起動に失敗するかもしれません。
コンパイラによっては、プログラムが依存している共有ライブラリのパスをプログラム
本体に書き込んでしまえるオプションを持っています。configureの --with-rpath
オプションはそれを利用します。--with-rpath=DIRとすると、実行時にDIRから
共有ライブラリを探すような設定になります。このオプションは今のところgccでしか
動作しません。
@c EN
In some cases, your have to run Gauche under the environment
you don't have much control. One of such cases is when you
want to run CGI script on the ISP's machine. It may become
a problem that your build of Gauche depends on some dynamically
loaded libraries that are installed in non-standard location.
For example, suppose you install a new libiconv.so in /home/yours/lib
on the ISP's server and compile Gauche with --with-iconv=/home/yours/lib.
You have set up correct environment variables such as LD_LIBRARY_PATH,
so you can invoke Gauche interpreter gosh without a problem. Now,
you write a CGI script. Unfortunately, the ISP's web server
doesn't set LD_LIBRARY_PATH as you desired, and your script never
runs on the server, for the interpreter can't find libiconv.so
in the system default path.
Some compilers have an option that writes exact path of shared
libraries that the binary depends on. A configure option --with-rpath
utilizes the feature. When an option --with-rpath=DIR is given,
configure sets up a build process so that the shared libraries
are looked from DIR. This works only on gcc, however.
@c COMMON
@c JP
インストール先の指定
@c EN
Customizing install location
@c COMMON
---------------------------------------------------
@c JP
次のようにconfigureスクリプトを起動することにより、インストール先の
ディレクトリを指定できます。
@c EN
Call configure with those parameters to specify where to install.
@c COMMON
% ./configure --prefix=$PREFIX --exec-prefix=$EXEC_PREFIX
@c JP
--prefix オプションが指定されなければ、 /usr/local が指定されたものとみなされます。
--exec-prefix オプションが指定されなければ、EXEC_PREFIXはPREFIXと同じものに
なります。
@c EN
If --prefix option is omitted, /usr/local is assumed as PREFIX.
If --exec-prefix option is omitted, EXEC_PREFIX is set the same as PREFIX.
@c COMMON
@c JP
インストールされるファイルの内訳は以下の通りです。
@c EN
The files are installed in those locations:
@c COMMON
$EXEC_PREFIX/bin/*
@c JP
インタプリタ (gosh) とコンフィグレーションスクリプト (gauche-config)
@c EN
The interpreter (gosh) and configuration script (gauche-config).
@c COMMON
$EXEC_PREFIX/lib/*
@c JP
ライブラリ (libgauche.a).
@c EN
Library (libgauche.a).
@c COMMON
$PREFIX/share/gauche/VERSION/include/*
@c JP
libgaucheをリンクするアプリケーションに必要なヘッダーファイル
@c EN
Header files required to create applications using libgauche.
@c COMMON
$PREFIX/share/gauche/VERSION/lib/*
@c JP
マシンに依存しないSchemeファイル
@c EN
Machine-independent Scheme files.
@c COMMON
$PREFIX/share/info/*
@c JP
infoファイル
@c EN
info files.
@c COMMON
$EXEC_PREFIX/lib/gauche/VERSION/ARCHITECTURE/*
@c JP
マシンに依存するファイル (.so, gosh, gauche-config, libgauche.a)
@c EN
Machine-dependent files (.so files, gosh, gauche-config, and libgauche.a)
@c COMMON
$PREFIX/share/gauche/site/lib/*
$EXEC_PREFIX/lib/gauche/site/VERSION/ARCHITECTURE/*
@c JP
ユーザが独自にインストールするマシン非依存/依存ファイルのデフォルトの置き場所。
@c EN
These are default locations where user installed machine-indenpedent/
dependent files will go.
@c COMMON
@c JP
最適化オプション
@c EN
Optimization options
@c COMMON
---------------------------------------------------
@c JP
Make時に、makeマクロOPTFLAGSを用いて追加のコンパイルオプションを指定すること
ができます。configureが設定するOPTFLAGS以外のオプションを試したい場合は
次のようにmakeを走らせて下さい。
@c EN
You can pass extra options at make time, using make macro OPTFLAGS.
'Configure' sets a default, but if you want to explore different
options, just run 'make' as follows:
@c COMMON
make OPTFLAGS="--some-compiler-option --other-option"
@c JP
アンインストール
@c EN
Uninstallation
@c COMMON
---------------------------------------------------
@c JP
インストールされたGaucheソフトウェアを取り除くには、ソースツリーのトップ
ディレクトリで
make uninstall
として下さい。
@c EN
You can remove installed Gauche software by running
make uninstall
on top of the source tree.
@c COMMON
@c JP
機種依存の情報
@c EN
Machine-dependent information
@c COMMON
---------------------------------------------------
@c JP
* MacOS X - 10.2.x以前のバージョンでは、dlcompatライブラリ(libdl)が
インストールされていることが必要です。http://fink.sourceforge.netから
ダウンロードできます。10.3以降では必要ありません。システム標準の
場所以外にdlcompatライブラリをインストールした場合は、configureの
--with-localオプションで場所を指定して下さい。
また、GCがpthreadsを要求するようになったので、--enable-threads=pthreads
も必要です。
(例:$HOME/include に dlfcn.h が、 $HOME/lib に libdl.aがある場合は
./configure --with-local=$HOME --enable-threads=pthreads
とする)
@c EN
* MacOS X - For 10.2.x and earlier, you need to install the dlcompat
library (libdl) from Fink project (http://fink.sourceforge.net)
before configuring Gauche. You don't need it if you have OSX
10.3 or later. If the dlcompat library is installed in non-standard
location, you have to tell configure the place by --with-local.
Besides, GC now requires pthreads on MacOS X, so you need
--enable-threads=pthreads.
For example, if you have dlfcn.h in $HOME/include and libdl.a
in $HOME/lib, you should do:
./configure --with-local=$HOME --enable-threads=pthreads
@c COMMON
@c JP
* IRIX with 64bit binary - デフォルトの32bit ABIではなく64bit ABIでコンパイル
したい場合は次のようにして下さい。
CC="cc -64" AS="as -64" ./configure
@c EN
* IRIX with 64bit binary - If you want to compile for 64bit ABI instead
of the default 32bit ABI, run configure like this:
CC="cc -64" AS="as -64" ./configure
@c COMMON
@c JP
* Linux/Crusoe TM5800 - 最近のLinuxでは Crusoe TM5800がi686互換とされる
ようになったようですが、gc中でi686特有のprefetch命令を使っているところ
でコンパイルに失敗するという報告がありました。とりあえずのfixは、
configure後にgc/Makefile中の
-DUSE_I686_PREFETCH
という記述を消してからmakeして下さい。
@c EN
* Linux/Crusoe TM5800 - It is reported that recent Linux kernel thinks
TM5800 as i686-compatible, and compilation of Gauche fails at
gc where the i686's prefetch instruction is used. A quick fix
is to edit gc/Makefile AFTER configure, to remove the following
flag:
-DUSE_I686_PREFETCH
Then make it.
@c COMMON