Autoconf 手册
- 格式:pdf
- 大小:618.46 KB
- 文档页数:60
Autoconf 详解AutoconfCreating Automatic Configuration Scripts Edition 2.13, for Autoconf version 2.13 December 1998by David MacKenzie and Ben Elliston???目录介绍创建configure脚本编写`configure.in'用autoscan创建`configure.in'用ifnames列举条件用autoconf创建configure用autoreconf更新configure脚本初始化和输出文件寻找configure的输入文件创建输出文件Makefile中的替换预定义输出变量创建目录自动地重新创建配置头文件配置头文件模板用autoheader创建`config.h.in'在子目录中配置其它包缺省的前缀configure中的版本号现有的测试对程序的选择对特定程序的检查对普通程序和文件的检查库文件库函数对特定函数的检查对普通函数的检查头文件对特定头文件的检查对普通头文件的检查结构类型定义对特定类型定义的检查对普通类型定义的检查C编译器的特征Fortran 77编译器的特征系统服务UNIX变种编写测试检验声明检验语法检验库检查运行时的特征运行测试程序测试程序指南测试函数可移植的Shell编程测试值和文件多种情况对语言的选择测试的结果定义C预处理器符号设定输出变量缓存结果缓存变量名缓存文件打印消息编写宏宏定义宏名引用宏之间的依赖性首要的宏建议的顺序过时的宏手工配置指定系统的类型获取规范的系统类型系统类型变量使用系统类型站点配置与外部软件一起工作选择包选项配置站点细节在安装的时候改变程序的名称转换选项转换的例子转换的规则设定站点缺省值运行configure脚本重新创建一个配置关于Autoconf的问题发布configure脚本为什么需要使用GNU m4?我如何解开死结?为什么不使用Imake?从版本1中升级改变了的文件名改变了的Makefile改变了的宏用autoupdate更新configure 改变了的结果改变了的宏的编写Autoconf的历史起源(Genesis)出发(Exodus)上路(Leviticus)发展(Numbers)现状(Deuteronomy)陈旧的宏名环境变量索引输出变量索引预处理器符号索引宏索引??Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation.只要版权声明和本许可声明保留在所有副本中,您就被授权制作和发行本手册的原文副本。
AUTOCONF 常用宏wh2010td@AC_INIT (unique-file-in-source-dir)寻找configure的输入文件所有configure脚本在作任何其他事情之前都必须调用AC_INIT。
此外唯一必须调用的宏是 AC_OUTPUT(参见创建输出文件)。
处理所有命令行参数并且寻找源代码目录。
unique-file-in-source-dir是一些在包的源代码目录中文件; configure在目录中检查这些文件是否存在以确定该目录是否包含源代码。
人们可能偶尔会用`--srcdir'给出错误的目录;这是一种安全性检查。
详情请参见运行configure脚本。
AC_CONFIG_AUX_DIR (dir)对于需要手工配置或者使用install程序的包来说,虽然在缺省源代码位置在大部分情况下看起来是正确的,包还是可能需要通过调用AC_CONFIG_AUX_DIR来告诉configure到那里去寻找一些其他的shell脚本。
在目录dir中使用`install-sh'、`config.sub'、`config.guess'和 Cygnus configure配置脚本。
它们是配置中使用的辅助文件。
dir既可以是绝对路径,也可以是相对于`srcdir'的相对路径。
缺省值是在 `srcdir'或者 `srcdir/..'或者`srcdir/../..'中首先找到`install-sh' 的目录。
不对其他文件进行检查,以便使AC_PROG_INSTALL不会自动地发布其他辅助文件。
它还要检查`install.sh',但因为有些make程序包含了在没有`Makefile'的情况下从`install.sh'中创建`install'的规则,所以那个名字过时了。
AC_OUTPUT ([file... [, extra-cmds [, init-cmds]]])创建输出文件每个Autoconf生成的configure脚本必须以对AC_OUTPUT的调用结尾。
添加型号需要上传特殊格式的配置文件,由于用户不能理解话机内部设定,不能自行编写,这一步由我们的工程师为您完成。
型号管理:默认安装后,我们已经为您配置了6 种型号,登陆后台,点击左边的 型号管理可以看到,如图:这6种型号分别对应 1,2,4,8 口网关,EP838 Phone 和 EP636 Phone。
默认安装的 6 种型号满足大部分配置需求。
如果您有特殊需求,请联系我们的工程师 为您特别定制。
2.模板管理:如图,型号添加完成后,即可为您需要的型号建立模板。
点击添加模板。
部分截图如下。
模板管理是最重要的一部份,填写错误,会导致网关无法正常注册,请认真对照文档和网关网页认真填写。
我将以典型的HT-842R 4口网关为例,作祥细的解释。
型号名称:左边的下拉菜单选择你要建立模板的型号。
序列号:不填,到后面的添加终端时才需要填写。
客户名:不填。
模板名: 可以为建立的模板起个名字,默认每种型号已内置两个简单模板,如HT842R-H323和HT842R-SIP,分别对应使用H323协议和使用 SIP协议的模板。
用户可根据自己的实际情况作相应修改。
如图:H323 设置:要使用H323协议,请按下面的方法设置。
(注意,设置H323协议后所有SIP 协议的设置将不起作用。
同理设置SIP协议也一样)协议(SIP/H323):使用H232协议,请填入H323。
(注意,只能填写括号给出的值,区分大小写,填写错误话机将会无法正常注册。
每个值由斜杠/分格开。
如(SIP/H323)则只有填写SIP 或填H323,后面有括号的同样按这个要求填写) 如图:H323终端模式:(GK_MODE/DIRECT_MODE)分别对应终端的“关守模式”和“直连模式”。
使用关守模式则填入“GK_MODE ”。
直连模式 则填入“DIRECT_MODE”。
对应终端网页如图:H323配置模式:(SINGLE_MODE/LINE_MODE) 对应配置模式的“单一配置”和 “按线路配置”。
autoreconf 源码编译1. 什么是 autoreconf?autoreconf 是一个用于自动化生成 GNU Autotools 构建系统所需文件的工具。
GNU Autotools 是一套用于自动化构建和配置软件的工具集,包括 Autoconf、Automake 和 Libtool。
使用 autoreconf 可以简化软件的构建过程,减少手动配置的工作量。
2. autoreconf 的作用在编译源码之前,通常需要先进行一系列的配置操作,例如生成 Makefile、检查编译环境等。
而 autoreconf 的作用就是根据项目中的 configure.ac 文件自动生成这些配置文件和脚本,从而简化了整个配置过程。
具体来说,autoreconf 会读取 configure.ac 文件,并根据其中的宏定义和规则生成以下文件:•configure:一个脚本文件,用于检查系统环境和生成 Makefile。
•aclocal.m4:包含所有宏定义的文件。
•Makefile.in:包含 Makefile 的模板。
•config.h.in:包含预处理器常量和宏定义的模板。
•stamp-h.in:在第一次运行 configure 时创建,用于标记是否需要重新生成 config.h。
通过自动生成这些文件,autoreconf 大大简化了软件构建过程中繁琐的手动配置步骤。
3. autoreconf 的使用方法要使用 autoreconf,首先需要确保系统中已经安装了 GNU Autotools 工具集。
在大多数 Linux 发行版中,可以通过包管理器直接安装这些工具。
安装完成后,进入源码目录,在命令行中运行以下命令:autoreconf -i其中,-i参数表示自动运行autoheader、aclocal、automake和autoconf这些工具。
运行 autoreconf 之后,会在当前目录生成 configure 脚本和其他相关文件。
autoconf与automake的完整例程一、 automake 的用途automake 和 autoconf 可以自动生成 GNU 的 Makefile ,虽然我们也可以手工写 Makefile ,但是考虑到在多硬件平台上运行,编译环境差异,依赖关系,静态和动态库的生成,等一系列的问题,对于复杂的代码树,用 automake 工具就成了更好的选择。
在下面的例程中,将介绍树型源码包的 Makefile 生成,其中包括生成库文件和可执行文件。
二、完整例程1.建立目录树a) 生成目录树$ mkdir lib$ mkdir src$ mkdir include$ touch include/xy.h$ touch lib/xy1.cpp$ touch lib/xy2.cpp$ touch src/main.cppb) 编辑源代码文件i. include/xy.h 内容如下:void xytest1();void xytest2();ii. lib/xy1.cpp 内容如下:#include <stdio.h>void xytest1(){ printf(“xytest1/n”); }iii. lib/xy2.cpp 内容如下:#include <stdio.h>void xytest2(){ printf(“xytest2/n”); }iv. src/main.cpp 内容如下:#include <xy.h>main(){xytest1();xytest2();}2. autoconfa) 生成默认的 configure.in$ autoscan此时目录下生成 configure.scan$ mv configure.scan configure.inb) 编辑 configure.in (为了书写简单,去掉了所有注释)AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)AM_INIT_AUTOMAKE(xytest, 1.0) # 此处是软件名和版本号AC_PROG_CXX # 自动检测编译器AC_PROG_CCAC_PROG_LIBTOOL # 生成动态/ 静态库需要LIBTOOL AC_OUTPUT(Makefile lib/Makefile src/Makefile) # 此处是输出的文件c) 自动生成 configure$ aclocal 它是一个perl 脚本,根据configure.in 产生aclocal.m4$ libtoolize –force它会生成 libtool 所需要的工具,主要为生成库做准备$ autoconf 通过 aclocal.m4 产生 configure3. automakea) Makefile.am 项层写法,编辑 ./Makefile.am 如下AUTOMAKE_OPTIONS=foreignSUBDIRS = lib srcb) Makefile.am 编译库文件的写法,编辑 lib/Makefile.am 如下DEFAULT_INCLUDES=-I../includelib_LTLIBRARIES = libxy_la_SOURCES =xy1.cpp xy2.cppc) Makefile.am 编译开执行程序的写法,编辑src/Makefile.am 如下DEFAULT_INCLUDES=-I../includebin_PROGRAMS = mainmain_SOURCES = main.cppmain_LDADD= -L../lib/.libs/ -lxyd) 生成 Makefile.in$ automake –add-missing4.编译运行(以 arm 为示例)$ ./configure –host=arm-linux 此时机器上需要有arm-linux-gcc 系统的编译工具$ make$ make install5.总结a) 需要手动编译的只有 configure.in, Makefile.am, 和源代码三处i. Makefile.am 中的常用设置项AM_CXXFLAGS= 编译 C++ 程序时所带的 FLAGSAM_CFLAGS= 编译C 程序时所带的FLAGSDEFAULT_INCLUDES= 编译时加入的include 目录DEFS= 编译时定义的DEFIND 值b) 注意看执行过程中有无错误提示。
GNU AUTOTOOLS 简介1.介绍大部分时候,你从网上下载了一个开放源代码的软件,在解压后,你一般会敲入以下三个命令来编译和安装你的程序:1)./configure2)make3)make install其中,configure脚本分析你的系统以找到合适的工具和库,make是真正用来编译构建软件的工具,make install来安装软件。
在开放源代码世界,configure脚本获得了广泛的使用,它使从源代码安装软件变得非常容易,本文主要就是介绍如何使用GNU autotools,以便使你能够以上面这种方式来编译和安装你的程序。
2.什么是GNU autotoolsGNU autotools主要包括下面三个工具:Autoconf –这个工具用来生成configure脚本。
就像前面提到的,这个脚本主要用来分析你的系统以找到合适的工具和库。
譬如:你的系统的C编译器是―cc‖还是―gcc‖?Automake –这个工具用来生成Makefiles。
它需要使用到Autoconf提供的信息。
譬如,如果Autoconf检测到你的系统使用―gcc‖,那Makefile就使用gcc作为C编译器。
反之,如果找到―cc‖,那就使用―cc‖。
Libtools –这个工具创建共享库。
它是平台无关的。
3.为―Hello,world‖添加Autoconf1) 创建一个―Hello,world!‖写一个简单的―Hello,world!‖程序hello.c:#include <stdio.h>int main(void){printf ("Hello World.\n");}写一个简单的MakefileMakefileEXEC:=helloall: $(EXEC).PHONY:cleanclean:rm -f hello *.o2) 添加Autoconf现在,我们将添加autoconf到这个程序。
关于GNU autotools的使用GNU Autotools指的就是下面的五个工具:(1)aclocal(2)autoscan(3)autoconf(4)autoheader(5)automakeAutotools的使用流程第一步:手工编写Makefile.am这个文件第二步:在源代码目录树的最高层运行autoscan。
然后手动修改configure.scan文件,并改名为configure.ac/ configure.in。
第三步:运行aclocal,它会根据configure.ac的内容生成aclocal.m4文件。
第四步:运行autoconf,它根据configure.ac和aclocal.m4的内容生成configure这个配置脚本文件。
第五步:运行automake --add-missing,它根据Makefile.am的内容生成Makefile.in。
第六步:运行configure,它会根据Makefile.in的内容生成Makefile这个文件。
AutoTools 傻瓜入门Makefile固然可以帮助make完成它的使命,但要承认的是,编写Makefile确实不是一件轻松的事,尤其对于一个较大的项目而言更是如此。
那么,有没有一种轻松的手段生成Makefile而同时又能让我们享受make 的优越性呢?本节要讲autotools系列工具正是为此而设的,它只需用户输入简单的目标文件、依赖文件、文件目录等就可以轻松地生成Makefile了,这无疑是广大用户的所希望的。
另外,这些工具还可以完成系统配置信息的收集,从而可以方便地处理各种移植性的问题。
也正是基于此,现在Linux上的软件开发一般都用autotools来制作Makefile。
学习GNU/LINUX开发的编程人员,上手之后不久就会在编译开源软件的时候碰到configure脚本,过段时间还会知道configure脚本是autoconf生成的;但是真正想用起来autoconf,却是要弄明白config.h,configure.in,Makfile.am等一大堆的文件,这可能要花些功夫。
作为Linux下的程序开发人员,一定都遇到过Makefile,用make命令来编译自己写的程序确实是很方便。
一般情况下,大家都是手工写一个简单Makefile,如果要想写出一个符合自由软件惯例的Makefile就不那么容易了. 在本文中,将介绍如何使用autoconf和automake两个工具来帮助我们自动地生成符合自由软件惯例的Makefile,这样就可以象常见的GNU程序一样,只要使用“./configure”,“make”,“make instal”就可以把程序安装到Linux系统中去了。
这将特别适合想做开放源代码软件的程序开发人员,又或如果你只是自己写些小的Toy程序,那么这个文章对你也会有很大的帮助。
一、Makefile介绍Makefile是用于自动编译和链接的,一个工程有很多文件组成,每一个文件的改变都会导致工程的重新链接,但是不是所有的文件都需要重新编译,Makefile中纪录有文件的信息,在make时会决定在链接的时候需要重新编译哪些文件。
Makefile的宗旨就是:让编译器知道要编译一个文件需要依赖其他的哪些文件。
当那些依赖文件有了改变,编译器会自动的发现最终的生成文件已经过时,而重新编译相应的模块。
Makefile的基本结构不是很复杂,但当一个程序开发人员开始写Makefile时,经常会怀疑自己写的是否符合惯例,而且自己写的Makefile经常和自己的开发环境相关联,当系统环境变量或路径发生了变化后,Makefile可能还要跟着修改。
这样就造成了手工书写Makefile的诸多问题,automake恰好能很好地帮助我们解决这些问题。
使用automake,程序开发人员只需要写一些简单的含有预定义宏的文件,由autoconf根据一个宏文件生成configure,由automake根据另一个宏文件生成Makefile.in,再使用configure依据Makefile.in来生成一个符合惯例的Makefile。
运用autoconf和automake自动生成Makefile实例讲解运用autoconf和automake自动生成Makefile实例讲解对于一个UNIX/Linux下C程序员来说,一个比较麻烦的工作就是写自己的Makefile。
可能你有如下经验:写一个简单的C程序,自己多写几行gcc命令就把程序变成可执行的了;写一个稍微复杂点的程序,源文件个数可能在30个左右,还是写一行行的gcc命令就麻烦了,你可能想到写个makefile,你可能也在这样做着;但你某一天会发现你写的这个Makefile可能不是一个所有UNIX/Linux类操作系统下通用的Makefile,比如某人下载了你的程序去他自己电脑上可能make不了。
这样,你就有必要了解并学会运用autoconf和automake了。
autoconf是一个用于生成可以自动地配置软件源代码包以适应多种UNIX类系统的shell脚本的工具。
由autoconf生成的配置脚本在运行的时候不需要用户的手工干预;通常它们甚至不需要手工给出参数以确定系统的类型。
相反,它们对软件包可能需要的各种特征进行独立的测试。
在每个测试之前,它们打印一个单行的消息以说明它们正在进行的检测,以使得用户不会因为等待脚本执行完毕而焦躁。
因此,它们在混合系统或者从各种常见UNIX变种定制而成的系统中工作的很好。
你也省了工作,没必要维护文件以储存由各个UNIX变种、各个发行版本所支持的特征的列表。
automake是一个从文件Makefile.am自动生成Makefile.in的工具。
每个Makefile.am基本上是一系列make的宏定义(make规则也会偶尔出现)生成的Makefile.in,服从GNU Makefile标准。
为了生成Makefile.in,automake需要perl。
但是由automake 创建的发布完全服从GNU标准,并且在创建中不需要perl。
在开始使用autoconf和automake之前,首先确认你的系统安装有GNU的如下软件:1. automake2. autoconf3. m44. perl5. 如果你需要产生共享库(shared library)则还需要GNU Libtool介绍方法之前大家看一下下面这个图,先记下autoconf和automake工作的几个步骤:步骤解释如下:1、由你的源文件通过autoscan命令生成configure.scan文件,然后修改configure.scan文件并重命名为configure.in2、由aclocal命令生成aclocal.m43、由autoconf命令生成configure4、编辑一个Makefile.am文件并由automake命令生成Makefile.in文件5、运行configure命令生成Makefileautomake支持三种目录层次:flat、shallow和deep。
学习autoconf和automakeautoconf和automake是啥?这要从类Unix系统的程序编译说起。
一般一个真正的工程肯定不只一个文件,而多个文件的编译是件很麻烦的事情(最简单的就是用gcc或者g 后面接着多个文件),再加上要推出跨平台的(一般只是跨不同的类Unix平台),还有啥包依赖啊什么的,很麻烦嗯。
于是就有了一个工具叫make,它接收一个名为Makefile的文件作为参数,自动地进行编译,还可以在Makefile里设置接受不同的选项,然后人们就可以make install、make all 什么的了。
然而不同系统的编译要用不同的编译参数,但是开源软件不可能带多个Makefile,而且又难写,囧么办?于是有了configure脚本,它自动检测系统,并接受一个Makefile.in文件,根据它来生成Makefile。
然而confiure脚本和Makefile.in还是很难写,至少我不会写,而且看得也眼花。
于是GNU推出了autoconf和automake,用于生成configure脚本和Makefile.in文件。
其中autoconf是用来生成configure的,automake是用来生成Makefile.in的。
貌似说了很多废话。
东西是拿来用的,不是拿来吹的,所以就拿来用吧。
首先看看autoconf怎么用。
autoconf接受一个configure.ac的文件,根据里面的内容来生成configure脚本。
怎么还有文件?嗯,总是要有输入的嘛,反正简单得多就是了(大型软件的configure.ac可能也挺复杂,不过总比自己写configure要来得轻松得多)。
现在一步一步来看看最简单的configure.ac里有些什么,首先是两句初始化命令:AC_INIT(src/main.cpp)AM_INIT_AUTOMAKE(main, 0.1)这两句是所有configure.ac里都必须有的,AC_INIT的参数是你main函数所在的文件(包括路径),AM_INIT_AUTOMAKE指定了程序的名称和版本号。
大型项目使用Automake/Autoconf完成编译配置使用过开源C/C++项目的同学们都知道,标准的编译过程已经变成了简单的三部曲:configure/make/make install, 使用起来很方便,不像平时自己写代码,要手写一堆复杂的Makefile,而且换个编译环境,Makefile还需要修改(Eclipse也是这样)。
这么好的东东当然要拿来用了,但GNU的Autotool系列博大精深,工具数量又多,涉及的语言也多,要是自己从头看到尾,黄花菜都凉了,项目估计早就结束了;上网搜样例倒是有一大堆,但都是“hello world”的样例,离真正完成大型项目的目标还差得远。
没有办法,对照网上的样例,再找几个开源的源码,然后参考各种Autotools的手册,花了2天时间,终于完成了一个基本可用的Autotools。
为了避免其他XDJM也浪费时间,因此将过程总结下来,就算是新年礼物,送给大家!!提纲挈领:使用Autotools其实很简单大家不要看到那么多工具,其实使用起来很简单,总结起来就是两部分:1)按照顺序调用各个工具;2)修改或者添加3个文件;整个操作顺序如下图:听到我这么讲,大家是否觉得有信心了?好的,下面我们来看具体如何操作:1.源码根目录调用autoscan脚本,生成configure.scan文件,然后将此文件重命名为configure.ac(或configure.in,早期使用.in后缀)2.修改【configure.ac】,利用autoconf提供的各种M4宏,配置项目需要的各种自动化探测项目3.编写【自定义宏】,建议每个宏一个单独的*.m4文件;4.调用acloca l收集configure.ac中用到的各种非Autoconf的宏,包括自定义宏;5.调用autoheader,扫描configure.ac(configure.in)、acconfig.h(如果存在),生成config.h.in宏定义文件,里面主要是根据configure.ac中某些特定宏(如AC_DEFINE)生成的#define和#undefine宏,configure在将根据实际的探测结果决定这些宏是否定义(具体见后面例子)。
Autotools 上手指南1——autoconf 基本思想 dccmx 于 2011年 一月 7日 发表 | 最后修改于 2011年 一月 10日 要想弄懂Autotools 并使用它,必须先要了解一下M4这个怪物。
那么何为M4呢,M4的名称取自Macro (M 后面跟4个字母…)。
它和C 预处理器里的宏是一个概念(其实,M4和C 预处理器都K&R 操刀设计的!!),用来处理文本替换。
也就是说,M4是bash 里的预处理器。
取自维基的例子:1 2 3 4 5 6 7 8 9 10 11 12 13 divert(-1) This `divert' discards this text. Note that I had to quote the `divert' in the comment so it wouldn't get undiverted. This starts the count at ONE as the incr is a preincrement. define(`H2_COUNT', 0) The define H2_COUNT is redefined every time the H2 macro is used. The dnl deletes everything on the line after it in the output (ie this bit) define(`H2', `define(`H2_COUNT', incr(H2_COUNT))'dnl `<h2>H2_COUNT. $1</h2>') divert(0)dnl diversion to 0 means back to normal dnl removes this line. H2(First Section) H2(Second Section) H2(Conclusion)这段M4宏用m4处理输出的结果就是:1 2 3 <h2>1. First Section</h2><h2>2. Second Section</h2><h2>3. Conclusion</h2>简单说下:1.M4的语法跟C 里面宏的语法差不多,都很像函数,名字加括号。
Autotools使用指南一、功能&简介:Linux环境下,我们编译程序啥的都是一般用的GCC&&GDB等等工具,直接使用GCC命令进行编译操作。
这种方式一般是适用于程序文件比较少,组织结构比较简单的情况。
但是,当我们程序文件比较的多的时候,或者是程序文件组织结构比较的复杂(例如在程序文件夹中存在文件夹多层嵌套以及复杂引用等),此时我们如果是直接使用GCC一点一点的编译工作量会非常的大,而且万一程序修改了,还要重新的再工作一遍。
为此,我们有了make工具,依靠Makefile辅助文件,我们可以方便的进行工程的管理,以及编译操作。
当程序很复杂的时候,依靠我们去手工的建立、维护Makefile文件是非常的不现实的,不仅很复杂,而且费时费力,还容易出错。
为此,就有了我们的_Autotools_工具,只要输入工程中的目标文件、依赖文件、文件目录等信息就可以自动生成Makefile。
二、Autotools 工具包:Autotools工具包的目标就是去方便的帮助我们得到我们需要的Makefile文件。
___Autotools使用流程:___<1>目录树的最高层运行autoscan,生成configure.scan文件;<2>运行aclocal,生成aclocal.m4文件;<3>运行autoconf,生成configure配置脚本;<4>运行autoheader,生成config.h.in文件;<5>手工编写Makefile.am文件;<6>运行automake,生成Makefile.in;<7>运行配置脚本configure,生成Makefile。
三、c源文件同一目录下Autotools的使用:如果你的源文件都放在同一个目录下面。
可以按照以下步骤来实现同一目录下的Autotools工具的使用:1、编写源代码:2、运行autoscan:第一步:我们需要在我们的<项目目录>下执行autoscan命令。
The GNU configure and build system Ian Lance TaylorCopyright c 1998Cygnus SolutionsPermission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.Permission is granted to copy and distribute modified versions of this manual under the con-ditions for verbatim copying,provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.Permission is granted to copy and distribute translations of this manual into another lan-guage,under the above conditions for modified versions,except that this permission notice may be stated in a translation approved by the Free Software Foundation.1IntroductionThis document describes the GNU configure and build systems.It describes how au-toconf,automake,libtool,and makefit together.It also includes a discussion of the older Cygnus configure system.This document does not describe in detail how to use each of the tools;see the respective manuals for that.Instead,it describes whichfiles the developer must write,whichfiles are machine generated and how they are generated,and where certain common problems should be addressed.This document draws on several sources,including the autoconf manual by David MacKenzie(see section“autoconf overview”in Autoconf),the automake manual by David MacKenzie and Tom Tromey(see section“automake overview”in GNU Automake),the libtool manual by Gordon Matzigkeit(see section“libtool overview”in GNU libtool),and the Cygnus configure manual by K.Richard Pixley.1.1GoalsThe GNU configure and build system has two main goals.Thefirst is to simplify the development of portable programs.The system permits the developer to concentrate on writing the program,simplifying many details of portability across Unix and even Windows systems,and permitting the developer to describe how to build the program using simple rules rather than complex Makefiles.The second is to simplify the building of programs distributed as source code.All programs are built using a simple,standardized,two step process.The program builder need not install any special tools in order to build the program.1.2ToolsThe GNU configure and build system is comprised of several different tools.Program developers must build and install all of these tools.People who just want to build programs from distributed sources normally do not need any special tools beyond a Unix shell,a make program,and a C compiler.autoconf provides a general portability framework,based on testing the features of the host system at build time.automake a system for describing how to build a program,permitting the developer to write a simplified‘Makefile’.libtool a standardized approach to building shared libraries.gettext provides a framework for translation of text messages into other languages;not really discussed in this document.m4autoconf requires the GNU version of m4;the standard Unix m4does not suffice.perl automake requires perl.1.3HistoryThis is a very brief and probably inaccurate history.As the number of Unix variants increased during the1980s,it became harder to write programs which could run on all variants.While it was often possible to use#ifdef to identify particular systems,developers frequently did not have access to every system,and the characteristics of some systems changed from version to version.By1992,at least three different approaches had been developed:•The Metaconfig program,by Larry Wall,Harlan Stenn,and Raphael Manfredi.•The Cygnus configure script,by K.Richard Pixley,and the gcc configure script,by Richard Stallman.These use essentially the same approach,and the developers com-municated regularly.•The autoconf program,by David MacKenzie.The Metaconfig program is still used for Perl and a few other programs.It is part of the Dist package.I do not know if it is being developed.In1994,David MacKenzie and others modified autoconf to incorporate all the features of Cygnus configure.Since then,there has been a slow but steady conversion of GNU programs from Cygnus configure to autoconf.gcc has been converted,eliminating the gcc configure script.GNU autoconf was regularly maintained until late1996.As of this writing in June, 1998,it has no public maintainer.Most programs are built using the make program,which requires the developer to write Makefiles describing how to build the programs.Since most programs are built in pretty much the same way,this led to a lot of duplication.The X Window system is built using the imake tool,which uses a database of rules to eliminate the duplication.However,building a tool which was developed using imake requires that the builder have imake installed,violating one of the goals of the GNU system.The new BSD make provides a standard library of Makefile fragments,which permits developers to write very simple Makefiles.However,this requires that the builder install the new BSD make program.In1994,David MacKenzie wrote thefirst version of automake,which permitted writing a simple build description which was converted into a Makefile which could be used by the standard make program.In1995,Tom Tromey completely rewrote automake in Perl,and he continues to enhance it.Various free packages built libraries,and by around1995several included support to build shared libraries on various platforms.However,there was no consistent approach.In early1996,Gordon Matzigkeit began working on libtool,which provided a standardized approach to building shared libraries.This was integrated into automake from the start.The development of automake and libtool was driven by the GNITS project,a group of GNU maintainers who designed standardized tools to help meet the GNU coding standards.1.4BuildingMost readers of this document should already know how to build a tool by running ‘configure’and‘make’.This section may serve as a quick introduction or reminder.Building a tool is normally as simple as running‘configure’followed by‘make’.You should normally run‘configure’from an empty directory,using some path to refer to the ‘configure’script in the source directory.The directory in which you run‘configure’is called the object directory.In order to use a object directory which is different from the source directory,you must be using the GNU version of‘make’,which has the required‘VPATH’support.Despite this restriction,using a different object directory is highly recommended:•It keeps thefiles generated during the build from cluttering up your sources.•It permits you to remove the builtfiles by simply removing the entire build directory.•It permits you to build from the same sources with several sets of configure options simultaneously.If you don’t have GNU‘make’,you will have to run‘configure’in the source directory. All GNU packages should support this;in particular,GNU packages should not assume the presence of GNU‘make’.After running‘configure’,you can build the tools by running‘make’.To install the tools,run‘make install’.Installing the tools will copy the programs and any required supportfiles to the installation directory.The location of the installation directory is controlled by‘configure’options,as described below.In the Cygnus tree at present,the infofiles are built and installed as a separate step. To build them,run‘make info’.To install them,run‘make install-info’.All‘configure’scripts support a wide variety of options.The most interesting ones are ‘--with’and‘--enable’options which are generally specific to particular tools.You can usually use the‘--help’option to get a list of interesting options for a particular configure script.The only generic options you are likely to use are the‘--prefix’and‘--exec-prefix’options.These options are used to specify the installation directory.The directory named by the‘--prefix’option will hold machine independentfiles such as infofiles.The directory named by the‘--exec-prefix’option,which is normally a subdirectory of the‘--prefix’directory,will hold machine dependentfiles such as executables.The default for‘--prefix’is‘/usr/local’.The default for‘--exec-prefix’is the value used for‘--prefix’.The convention used in Cygnus releases is to use a‘--prefix’option of ‘/usr/cygnus/release’,where release is the name of the release,and to use a ‘--exec-prefix’option of‘/usr/cygnus/release/H-host’,where host is the configuration name of the host system(see Chapter4[Configuration Names],page20).Do not use either the source or the object directory as the installation directory.That will just lead to confusion.2Getting StartedTo start using the GNU configure and build system with your software package,you must write threefiles,and you must run some tools to manually generate additionalfiles.2.1Write configure.inYou mustfirst write thefile‘configure.in’.This is an autoconf inputfile,and the autoconf manual describes in detail what thisfile should look like.You will write tests in your‘configure.in’file to check for conditions that may change from one system to another,such as the presence of particular headerfiles or functions.For example,not all systems support the‘gettimeofday’function.If you want to use the ‘gettimeofday’function when it is available,and to use some other function when it is not, you would check for this by putting‘AC_CHECK_FUNCS(gettimeofday)’in‘configure.in’.When the configure script is run at build time,this will arrange to define the preprocessor macro‘HAVE_GETTIMEOFDAY’to the value1if the‘gettimeofday’function is available,and to not define the macro at all if the function is not available.Your code can then use ‘#ifdef’to test whether it is safe to call‘gettimeofday’.If you have an existing body of code,the‘autoscan’program may help identify potential portability problems,and hence configure tests that you will want to use.See section “Invoking autoscan”in the autoconf manual.Another handy tool for an existing body of code is‘ifnames’.This will show you all the preprocessor conditionals that the code already uses.See section“Invoking ifnames”in the autoconf manual.Besides the portability tests which are specific to your particular package,every ‘configure.in’file should contain the following macros.‘AC_INIT’This macro takes a single argument,which is the name of afile in your package.For example,‘AC_INIT(foo.c)’.‘AC_PREREQ(VERSION)’This macro is optional.It may be used to indicate the version of‘autoconf’that you are using.This will prevent users from running an earlier version of‘autoconf’and perhaps getting an invalid‘configure’script.For example,‘AC_PREREQ(2.12)’.‘AM_INIT_AUTOMAKE’This macro takes two arguments:the name of the package,and a version num-ber.For example,‘AM_INIT_AUTOMAKE(foo,1.0)’.(This macro is not neededif you are not using automake).‘AM_CONFIG_HEADER’This macro names the headerfile which will hold the preprocessor macro def-initions at run time.Normally this should be‘config.h’.Your sources wouldthen use‘#include"config.h"’to include it.This macro may optionally name the inputfile for that headerfile;by default,this is‘config.h.in’,but thatfile name works poorly on DOSfilesystems.Therefore,it is often better to name it explicitly as‘config.in’.This is what you should normally put in‘configure.in’:AM_CONFIG_HEADER(config.h:config.in)(If you are not using automake,use‘AC_CONFIG_HEADER’rather than‘AM_CONFIG_HEADER’).‘AM_MAINTAINER_MODE’This macro always appears in Cygnus configure scripts.Other programs mayor may not use it.If this macro is used,the‘--enable-maintainer-mode’option is required toenable automatic rebuilding of generatedfiles used by the configure system.This of course requires that developers be aware of,and use,that option.If this macro is not used,then the generatedfiles will always be rebuilt automat-ically.This will cause problems if the wrong versions of autoconf,automake,or others are in the builder’s‘PATH’.(If you are not using automake,you do not need to use this macro).‘AC_EXEEXT’Either this macro or‘AM_EXEEXT’always appears in Cygnus configurefiles.Other programs may or may not use one of them.This macro looks for the executable suffix used on the host system.On Unixsystems,this is the empty string.On Windows systems,this is‘.exe’.Thismacro directs automake to use the executable suffix as appropriate when cre-ating programs.This macro does not take any arguments.The‘AC_EXEEXT’form is new,and is part of a Cygnus patch to autoconf tosupport compiling with Visual C++.Older programs use‘AM_EXEEXT’instead.(Programs which do not use automake use neither‘AC_EXEEXT’nor‘AM_EXEEXT’).‘AC_PROG_CC’If you are writing C code,you will normally want to use this macro.It locatesthe C compiler to use.It does not take any arguments.However,if this‘configure.in’file is for a library which is to be compiledby a cross compiler which may not fully work,then you will not want to use‘AC_PROG_CC’.Instead,you will want to use a variant which does not call themacro‘AC_PROG_CC_WORKS’.Examples can be found in various‘configure.in’files for libraries that are compiled with cross compilers,such as libiberty orlibgloss.This is essentially a bug in autoconf,and there will probably be abetter workaround at some point.‘AC_PROG_CXX’If you are writing C++code,you will want to use this macro.It locates theC++compiler to use.It does not take any arguments.The same cross compilercomments apply as for‘AC_PROG_CC’.‘AM_PROG_LIBTOOL’If you want to build libraries,and you want to permit them to be shared,oryou want to link against libraries which were built using libtool,then you willneed this macro.This macro is required in order to use libtool.By default,this will cause all libraries to be built as shared libraries.To prevent this–to change the default–use‘AM_DISABLE_SHARED’before‘AM_PROG_LIBTOOL’.The configure options‘--enable-shared’and‘--disable-shared’may be used to override the default at build time.‘AC_DEFINE(_GNU_SOURCE)’GNU packages should normally include this line before any other feature tests.This defines the macro‘_GNU_SOURCE’when compiling,which directs the libcheaderfiles to provide the standard GNU system interfaces including all GNUextensions.If this macro is not defined,certain GNU extensions may not beavailable.‘AC_OUTPUT’This macro takes a list offile names which the configure process should pro-duce.This is normally a list of one or more‘Makefile’files in different direc-tories.If your package lives entirely in a single directory,you would use simply‘AC_OUTPUT(Makefile)’.If you also have,for example,a‘lib’subdirectory,you would use‘AC_OUTPUT(Makefile lib/Makefile)’.If you want to use locally defined macros in your‘configure.in’file,then you will need to write a‘acinclude.m4’file which defines them(if not using automake,thisfile is called ‘aclocal.m4’).Alternatively,you can put separate macros in an‘m4’subdirectory,and put ‘ACLOCAL_AMFLAGS=-I m4’in your‘Makefile.am’file so that the‘aclocal’program will be able tofind them.The different macro prefixes indicate which tool defines the macro.Macros which start with‘AC_’are part of autoconf.Macros which start with‘AM_’are provided by automake or libtool.2.2Write Makefile.amYou must write thefile‘Makefile.am’.This is an automake inputfile,and the automake manual describes in detail what thisfile should look like.The automake commands in‘Makefile.am’mostly look like variable assignments in a ‘Makefile’.automake recognizes special variable names,and automatically add make rules to the output as needed.There will be one‘Makefile.am’file for each directory in your package.For each direc-tory with subdirectories,the‘Makefile.am’file should contain the lineSUBDIRS=dir dir...where each dir is the name of a subdirectory.For each‘Makefile.am’,there should be a corresponding‘Makefile’in the‘AC_OUTPUT’macro in‘configure.in’.Every‘Makefile.am’written at Cygnus should contain the lineAUTOMAKE_OPTIONS=cygnusThis puts automake into Cygnus mode.See the automake manual for details.You may to include the version number of‘automake’that you are using on the ‘AUTOMAKE_OPTIONS’line.For example,AUTOMAKE_OPTIONS=cygnus 1.3This will prevent users from running an earlier version of‘automake’and perhaps getting an invalid‘Makefile.in’.If your package builds a program,then in the directory where that program is built you will normally want a line likebin_PROGRAMS=programwhere program is the name of the program.You will then want a line like program_SOURCES=file file...where eachfile is the name of a sourcefile to link into the program(e.g.,‘foo.c’).If your package builds a library,and you do not want the library to ever be built as a shared library,then in the directory where that library is built you will normally want a line likelib_LIBRARIES=lib name.awhere‘lib name.a’is the name of the library.You will then want a line like lib name_a_SOURCES=file file...where eachfile is the name of a sourcefile to add to the library.If your package builds a library,and you want to permit building the library as a shared library,then in the directory where that library is built you will normally want a line like lib_LTLIBRARIES=lib The use of‘LTLIBRARIES’,and the‘.la’extension,indicate a library to be built using libtool.As usual,you will then want a line likelib name_la_SOURCES=file file...The strings‘bin’and‘lib’that appear above in‘bin_PROGRAMS’and‘lib_LIBRARIES’are not arbitrary.They refer to particular directories,which may be set by the‘--bindir’and‘--libdir’options to‘configure’.If those options are not used,the default values are based on the‘--prefix’or‘--exec-prefix’options to‘configure’.It is possible to use other names if the program or library should be installed in some other directory.The‘Makefile.am’file may also contain almost anything that may appear in a normal ‘Makefile’.automake also supports many other special variables,as well as conditionals.See the automake manual for more information.2.3Write acconfig.hIf you are generating a portability headerfile,(i.e.,you are using‘AM_CONFIG_HEADER’in‘configure.in’),then you will have to write a‘acconfig.h’file.It will have to contain the following lines./*Name of package.*/#undef PACKAGE/*Version of package.*/#undef VERSIONThis requirement is really a bug in the system,and the requirement may be eliminated at some later date.The‘acconfig.h’file will also similar comment and‘#undef’lines for any unusual macros in the‘configure.in’file,including any macro which appears in a‘AC_DEFINE’macro.In particular,if you are writing a GNU package and therefore include ‘AC_DEFINE(_GNU_SOURCE)’in‘configure.in’as suggested above,you will need lines like this in‘acconfig.h’:/*Enable GNU extensions.*/#undef_GNU_SOURCENormally the‘autoheader’program will inform you of any such requirements by print-ing an error message when it is run.However,if you do anything particular odd in your‘configure.in’file,you will have to make sure that the right entries appear in ‘acconfig.h’,since otherwise the results of the tests may not be available in the‘config.h’file which your code will use.(Thee‘PACKAGE’and‘VERSION’lines are not required if you are not using automake,and in that case you may not need a‘acconfig.h’file at all).2.4GeneratefilesOnce you have written‘configure.in’,‘Makefile.am’,‘acconfig.h’,and possibly ‘acinclude.m4’,you must use autoconf and automake programs to produce thefirst ver-sions of the generatedfiles.This is done by executing the following sequence of commands.aclocalautoconfautoheaderautomakeThe‘aclocal’and‘automake’commands are part of the automake package,and the ‘autoconf’and‘autoheader’commands are part of the autoconf package.If you are using a‘m4’subdirectory for your macros,you will need to use the‘-I m4’option when you run‘aclocal’.If you are not using the Cygnus tree,use the‘-a’option when running‘automake’command in order to copy the required supportfiles into your source directory.If you are using libtool,you must build and install the libtool package with the same ‘--prefix’and‘--exec-prefix’options as you used with the autoconf and automake packages.You must do this before running any of the above commands.If you are not using the Cygnus tree,you will need to run the‘libtoolize’program to copy the libtool supportfiles into your directory.Once you have managed to run these commands without getting any errors,you should create a new empty directory,and run the‘configure’script which will have been created by‘autoconf’with the‘--enable-maintainer-mode’option.This will give you a set of Makefiles which will include rules to automatically rebuild all the generatedfiles.After doing that,whenever you have changed some of the inputfiles and want to regen-erated the otherfiles,go to your object directory and run‘make’.Doing this is more reliable than trying to rebuild thefiles manually,because there are complex order dependencies and it is easy to forget something.2.5ExampleLet’s consider a trivial example.Suppose we want to write a simple version of‘touch’.Our program,which we will call ‘poke’,will take a singlefile name argument,and use the‘utime’system call to set the modification and access times of thefile to the current time.We want this program to be highly portable.We’llfirst see what this looks like without using autoconf and automake,and then see what it looks like with them.2.5.1First TryHere is ourfirst try at‘poke.c’.Note that we’ve written it without ANSI/ISO C prototypes,since we want it to be highly portable.#include<stdio.h>#include<stdlib.h>#include<sys/types.h>#include<utime.h>intmain(argc,argv)int argc;char**argv;{if(argc!=2){fprintf(stderr,"Usage:poke file\n");exit(1);}if(utime(argv[1],NULL)<0){perror("utime");exit(1);}exit(0);}We also write a simple‘Makefile’.CC=gccCFLAGS=-g-O2all:pokepoke:poke.o$(CC)-o poke$(CFLAGS)$(LDFLAGS)poke.oSo far,so good.Unfortunately,there are a few problems.On older Unix systems derived from BSD4.3,the‘utime’system call does not accept a second argument of‘NULL’.On those systems,we need to pass a pointer to‘struct utimbuf’structure.Unfortunately,even older systems don’t define that structure;on those systems,we need to pass an array of two‘long’values.The headerfile‘stdlib.h’was invented by ANSI C,and older systems don’t have a copy.We included it above to get a declaration of‘exit’.We canfind some of these portability problems by running‘autoscan’,which will create a‘configure.scan’file which we can use as a prototype for our‘configure.in’file.I won’t show the output,but it will notice the potential problems with‘utime’and‘stdlib.h’.In our‘Makefile’,we don’t provide any way to install the program.This doesn’t matter much for such a simple example,but a real program will need an‘install’target.For that matter,we will also want a‘clean’target.2.5.2Second TryHere is our second try at this program.We modify‘poke.c’to use preprocessor macros to control what features are available. (I’ve cheated a bit by using the same macro names which autoconf will use).#include<stdio.h>#ifdef STDC_HEADERS#include<stdlib.h>#endif#include<sys/types.h>#ifdef HAVE_UTIME_H#include<utime.h>#endif#ifndef HAVE_UTIME_NULL#include<time.h>#ifndef HAVE_STRUCT_UTIMBUFstruct utimbuf{long actime;long modtime;};#endifstatic intutime_now(file)char*file;{struct utimbuf now;now.actime=now.modtime=time(NULL);return utime(file,&now);}#define utime(f,p)utime_now(f)#endif/*HAVE_UTIME_NULL*/intmain(argc,argv)int argc;char**argv;{if(argc!=2){fprintf(stderr,"Usage:poke file\n");exit(1);}if(utime(argv[1],NULL)<0){perror("utime");exit(1);}exit(0);}Here is the associated‘Makefile’.We’ve added support for the preprocessorflags we use.We’ve also added‘install’and‘clean’targets.#Set this to your installation directory.bindir=/usr/local/bin#Uncomment this if you have the standard ANSI/ISO C header files.#STDC_HDRS=-DSTDC_HEADERS#Uncomment this if you have utime.h.#UTIME_H=-DHAVE_UTIME_H#Uncomment this if utime(FILE,NULL)works on your system.#UTIME_NULL=-DHAVE_UTIME_NULL#Uncomment this if struct utimbuf is defined in utime.h.#UTIMBUF=-DHAVE_STRUCT_UTIMBUFCC=gccCFLAGS=-g-O2ALL_CFLAGS=$(STDC_HDRS)$(UTIME_H)$(UTIME_NULL)$(UTIMBUF)$(CFLAGS) all:pokepoke:poke.o$(CC)-o poke$(ALL_CFLAGS)$(LDFLAGS)poke.o.c.o:$(CC)-c$(ALL_CFLAGS)poke.cinstall:pokecp poke$(bindir)/pokeclean:rm poke poke.oSome problems with this approach should be clear.Users who want to compile poke will have to know how‘utime’works on their systems, so that they can uncomment the‘Makefile’correctly.The installation is done using‘cp’,but many systems have an‘install’program which may be used,and which supports optional features such as stripping debugging information out of the installed binary.The use of‘Makefile’variables like‘CC’,‘CFLAGS’and‘LDFLAGS’follows the requirements of the GNU standards.This is convenient for all packages,since it reduces surprises for users.However,it is easy to get the details wrong,and wind up with a slightly nonstandard distribution.2.5.3Third TryFor our third try at this program,we will write a‘configure.in’script to discover the configuration features on the host system,rather than requiring the user to edit the ‘Makefile’.We will also write a‘Makefile.am’rather than a‘Makefile’.The only change to‘poke.c’is to add a line at the start of thefile:#include"config.h"The new‘configure.in’file is as follows.AC_INIT(poke.c)AM_INIT_AUTOMAKE(poke,1.0)AM_CONFIG_HEADER(config.h:config.in)AC_PROG_CCAC_HEADER_STDCAC_CHECK_HEADERS(utime.h)AC_EGREP_HEADER(utimbuf,utime.h,AC_DEFINE(HAVE_STRUCT_UTIMBUF))AC_FUNC_UTIME_NULLAC_OUTPUT(Makefile)Thefirst four macros in thisfile,and the last one,were described above;see Section2.1 [Write configure.in],page4.If we omit these macros,then when we run‘automake’we will get a reminder that we need them.The other macros are standard autoconf macros.‘AC_HEADER_STDC’Check for standard C headers.‘AC_CHECK_HEADERS’Check whether a particular headerfile exists.‘AC_EGREP_HEADER’Check for a particular string in a particular headerfile,in this case checkingfor‘utimbuf’in‘utime.h’.‘AC_FUNC_UTIME_NULL’Check whether‘utime’accepts a NULL second argument to set thefile changetime to the current time.See the autoconf manual for a more complete description.The new‘Makefile.am’file is as follows.Note how simple this is compared to our earlier ‘Makefile’.bin_PROGRAMS=pokepoke_SOURCES=poke.cThis means that we should build a single program name‘poke’.It should be installed in the binary directory,which we called‘bindir’earlier.The program‘poke’is built from the sourcefile‘poke.c’.We must also write a‘acconfig.h’file.Besides‘PACKAGE’and‘VERSION’,which must be mentioned for all packages which use automake,we must include‘HAVE_STRUCT_UTIMBUF’, since we mentioned it in an‘AC_DEFINE’./*Name of package.*/#undef PACKAGE/*Version of package.*/#undef VERSION/*Whether utime.h defines struct utimbuf.*/#undef HAVE_STRUCT_UTIMBUF2.5.4Generate FilesWe must now generate the otherfiles,using the following commands.。
automake中文手册收藏GNU AutomakeFor version 1.3, 3 April 1998 David MacKenzie and Tom Tromey目录·介绍·通用性概念o通用操作o深度o严格性o统一命名机制o派生变量是如何命名的·一些实例软件包o一个简单的例子,从起点到终点o一个经典的程序o创建etags和ctags·创建`Makefile.in'·扫描`configure.in'o配置需求oAutomake能够识别的其它事情o自动生成的aclocal.m4o由Automake支持的Autoconf宏 o编写你自己的aclocal宏·顶层`Makefile.am'·创建程序和库o创建一个程序o创建一个库o对LIBOBJS和ALLOCA的特别处理 o创建一个共享库o创建一个程序时使用的变量o对Yacc和Lex的支持oC++和其它语言o自动de-ANSI-ficationo自动的依赖性(dependency)跟踪·其它派生对象o可执行的脚本o头文件o与体系结构无关(Architecture-independent)的数据文件o已创建的源代码·其它GNU工具oEmacs LispoGettextoGuileoLibtooloJava·创建文档oTexinfooMan手册·安装了些什么·清除了些什么·需要发布哪些文件·对测试套件(test suites)的支持·改变Automake的行为·其它规则o与etags之间的界面o处理新的文件扩展名·条件(Conditionals)·--gnuand --gnits的效果·--cygnus的效果·什么时候Automake不够用·发布`Makefile.in'·未来的某些想法·索引@dircategory GNU admin @direntry * automake: (automake). Making Makefile.in's @dircategory Individual utilities @direntry * aclocal: (automake)Invoking aclocal. Generating aclocal.m4Copyright (C) 1995, 96 Free Software Foundation, Inc.这是GNU Automake文档的第一版,并且是针对GNU Automake 1.3的。