









[blog]
[ML]
[todo]
[CVS]
[bug]
[apache log]
[swiki log]
[statistics]
[map]
[man]
[info]
[アンテナ]
Autoconf, Automake
書籍:GNU Autoconf/Automake/Libtoolを読みながら、忘れないように要約をメモする。

歴史的背景について
- Unixが登場し、次第に発展するにつれて、各ベンダの改良により、ソースレベルの移植性が損なわれるようになってきた。
- 1992年の時点で、移植性を改善する4つのツールがあった。
- Metaconfig(PerlのLarry Wall氏、他)
- configure script( Cygnus, GCCのもの GCCのものは、RMSが書いた)
- GNU Autoconf Package( David MacKenzie )
- Imake( X windows用 )
- configure scriptには、クロスコンパイル環境も設定できた。
- Metaconfig(今でも使われているかも、最近perlをソースから入れることは無いので不明)では、Makefile作成時にユーザへの問い合わせ(Yes or No )が必要であった。
- configure scriptは、Autoconf、Imakeから生成された
- 1994年の時点で、Autoconfのための入力ファイル Makefile.inをいちいち書くのが難儀であったため、Automakeが作られた。
- Automakeは、Makefile.amからMakefile.inを作成する。
- 1995年にAutomakeは、 Tom Tromeyに書きなおされた。
- 1998年にAutomakeは Windows(Cygwin)でも動作するようになる。
- こうして、Automake, Autoconfは標準的なツールとなった(らしい)のだ。

基本的なこと

Configuration Nameについて
- Configuration Nameは、configureなどのツールで使うこともあるが、通常は明示的に指定する必要はない。
- ターゲットマシンの指定は、configuration tripletsでなされる
- 特にクロスコンパイル環境で重要だ
- たいていのUNIXでは、config.guessで、走っているマシンのConfiguration Nameを正しく表示してくれる(但し、C CompilerとAssemblerが必須)
- cpu-manufacturer-kernel-operating_systemで表記され、下記の例のような感じだ。
- Compiling a simple package for a GNU/Linux system:host = build = target = `i586-pc-linux-gnu'
- Cross-compiling a package on a GNU/Linux system that is intended to run on an IBM AIX machine: build = `i586-pc-linux-gnu', host = target = `rs6000-ibm-aix3.2'
- Building a Solaris-hosted MIPS-ECOFF cross-compiler on a GNU/Linux system: build = `i586-pc-linux-gnu', host = `sparc-sun-solaris2.4', target = `mips-idt-ecoff'
- じゃあ、もう少し詳細にconfiguration tripletsをみてみる
- cpu
- プロセッサ名を指定(i386, i586, i686, mipsel, sparcなど)
- manufacture
- マニュファクチャを指定する。(pcとか, hpとか、sunとか わからねば unknownだ)
- manufactureは、省略できるときもある(i386-linuxみたく。config.subが補完してくれるからだ)
- operating_system
- OSを指定する。(winnt4.0, solalis2.5など、バージョンを特定できなければ、aix4.1.4.0のような指定もOK)
- 組み込み向けでは、OSを指定するのではなく、オブジェクトファイル形式を指定する(elf, coffなど)
- kernel
- kernelを指定する。i586-pc-linux-gnulibc1の場合、ちゃんとlinuxをkernel指定とみてくれる

入力ファイルに関して
- Makefile.amは、Automakeの入力ファイル。
- configure.inは、Autoconfの入力ファイル。


本サイトの関連ページ

関連サイト

Links to this Page
- gettext last edited on 26 November 2001 at 2:36 pm
- Automake last edited on 18 January 2003 at 10:32 am