GNU Autoconf Introduction

GNU Autoconf Introduction下载地址:https://www.gnu.org/software/autoconf/manual/autoconf.pdfAutoconfisatoolforproducingshellscriptsthatautomaticallyconfiguresoftwaresourcecodepackagestoadapttomanykindsofPo

大家好,又见面了,我是你们的朋友全栈君。

下载地址:https://www.gnu.org/software/autoconf/manual/autoconf.pdf


Autoconf is a tool for producing shell scripts that automatically configure software source code packages to adapt to many kinds of Posix-like systems.

Autoconf是一种用于生成shell脚本的工具,可自动配置软件源代码包,以适应多种类型的 Posix-like 系统。

The configuration scripts produced by Autoconf are independent of Autoconf when they are run, so their users do not need to have Autoconf.

Autoconf 生成的配置脚本在运行时独立于Autoconf,因此用户不需要安装 Autoconf。


The configuration scripts produced by Autoconf require no manual user intervention when run;

Autoconf 生成的配置脚本在运行时并不需要用户手动干预

they do not normally even need an argument specifying the system type.

通常它们也不需要通过参数指定系统的类型。

Instead, they individually test for the presence of each feature that the software package they are for might need.

取而代之的是,它们会单独测试每个功能可能需要的软件包是否存在

(Before each check, they print a one-line message stating what they are checking for, so the user doesn’t get too bored while waiting for the script to finish.)

(在每次检查之前, 它们会打印一行消息, 说明它们正在检查什么, 所以用户在等待脚本完成时也不会感到无聊)。

As a result, they deal well with systems that are hybrids or customized from the more common Posix variants.

这样导致的结果就是它能够很好的处理混血系统或常见的 Posix 变体定制系统.

There is no need to maintain files that list the features supported by each release of each variant of Posix.

并不需要维护 各个版本Posix 变体系统所支持的功能特性的文件列表


For each software package that Autoconf is used with, it creates a configuration script from a template file that lists the system features that the package needs or can use.

对于使用 Autoconf 的每个软件包, 它将从模板文件创建一个配置脚本, 该模板文件列出了软件包需要或可以使用的系统功能

After the shell code to recognize and respond to a system feature has been written, Autoconf allows it to be shared by many software packages that can use (or need) that feature.

在编写了用于识别和响应系统功能的shell代码之后,Autoconf允许它被许多可以使用(或需要)该功能的软件包共享。

If it later turns out that the shell code needs adjustment for some reason, it needs to be changed in only one place;

如果后期由于某种原因需要调整shell代码,那么仅需要在一个地方进行更改即可;

all of the configuration scripts can be regenerated automatically to take advantage of the updated code.

所有配置脚本都可以自动重新生成,以利用更新的代码。


Those who do not understand Autoconf are condemned to reinvent it, poorly.

一些不了解 Autoconf 的人谴责它是重复造轮子,这很糟糕。

The primary goal of Autoconf is making the user’s life easier; making the maintainer’s life easier is only a secondary goal.

Autoconf 的主要目标是使用户的生活更轻松;使维护者的生活更轻松仅是次要目标。

Put another way, the primary goal is not to make the generation of ‘configure’ automatic for package maintainers
(although patches along that front are welcome, since package maintainers form the user base of Autoconf);

换句话说, Autoconf 的主要目标并不是为软件包维护者自动生成 ‘configure’
(尽管这个前端的补丁很受欢迎,因为软件包维护者成了Autoconf 的用户群)

rather, the goal is to make ‘configure’ painless, portable, and predictable for the end user of each auto confiscated package.

相反,它的目标是使最终用户自动化 ‘配置’ 包的过程变得无痛,可移植 和 可预测

And to this degree, Autoconf is highly successful at its goal — most complaints to the Autoconf list are about difficulties in writing Autoconf input, and not in the behavior of the resulting ‘configure’.

在这种程度上可以说 Autoconf 的目标是非常成功的 —— 对 Autoconf 列出的大部分抱怨都是写Autoconf 脚本难,
而不是其生成 ‘configure’ 的行为难。

Even packages that don’t use Autoconf will generally provide a ‘configure’ script,

即使不使用 Autoconf 的包通常也会提供一个 ‘configure’ 脚本,

and the most common complaint about these alternative home-grown scripts is that they fail to meet one or more of the GNU Coding Standards (see Section ‘Configuration’ in The GNU Coding Standards) that users have come to expect from Autoconf-generated ‘configure’ scripts.

对于一些原生脚本最常见的抱怨是它们不符合一个或多个GNU编码标准( 请参阅GNU编码标准中的 ‘Configuration’ 一节 )
用户已经期望使用 Autoconf 生成 ‘configure’ 脚本。


The Metaconfig package is similar in purpose to Autoconf, but the scripts it produces require manual user intervention, which is quite inconvenient when configuring large source trees.

Metaconfig 软件包的目的与 Autoconf 类似, 但它生成的脚本需要用户手动干预, 这在配置大型源代码树时相当不方便。

Unlike Metaconfig scripts, Autoconf scripts can support cross-compiling, if some care is taken in writing them.

与Metaconfig脚本不同,Autoconf脚本可以支持交叉编译,如果需要编写它们请注意。


Autoconf does not solve all problems related to making portable software packages—for a more complete solution, it should be used in concert with other GNU build tools like Automake and Libtool.

Autoconf并不能解决制作可移植软件包相关的所有问题 —— 一个更完整的解决方案是,
应该与其他GNU构建工具 Automake 和 Libtool 协调使用

These other tools take on jobs like the creation of a portable, recursive makefile with all of the standard targets, linking of shared libraries, and so on.

这些其他工具承担的工作有,为所有标准目标平台创建一个可移植的、能够递归的 makefile,链接共享库,等等

See Chapter 2 [The GNU Build System], page 3, for more information.

有关详细信息,请参阅第2章 [ GNU构建系统 ],第3页。


Autoconf imposes some restrictions on the names of macros used with #if in C programs
(see Section B.3 [Preprocessor Symbol Index], page 366).

Autoconf 对 C 程序中 #if 使用的宏名称施加了一些限制
( 请参见第B.3节[ 预处理器符号索引 ],第366页 )


Autoconf requires GNU M4 version 1.4.6 or later in order to generate the scripts.

Autoconf 需要 GNU M4 1.4.6 或更高版本才能生成脚本。

It uses features that some versions of M4, including GNU M4 1.3, do not have.

Autoconf 使用的功能在一些版本的 M4 上(包括GNU M4 1.3)没有。

Autoconf works better with GNU M4 version 1.4.14 or later, though this is not required.

Autoconf 最好使用 GNU M4 1.4.14 或更高版本,尽管这不是必需的。


See Section 18.5 [Autoconf 1], page 318, for information about upgrading from version 1.

有关从版本1升级的信息,请参见第18.5节[Autoconf 1],第318页。

See Chapter 21 [History], page 351, for the story of Autoconf’s development.

有关 Autoconf 开发的故事,请参见第21章[历史],第351页。

See Chapter 20 [FAQ], page 341, for answers to some common questions about Autoconf.

有关 Autoconf 的一些常见问题的答案,请参阅第20章[常见问题],第341页。


See the Autoconf web page for up-to-date information, details on the mailing lists, pointers to a list of known bugs, etc.

请参阅 Autoconf 网页了解最新信息,比如邮件列表的详细信息、指向已知错误列表的详细信息, 等等。

Mail suggestions to the Autoconf mailing list. Past suggestions are archived.

可以发送建议到 Autoconf 邮件列表。 过去的建议已被存档。


Mail bug reports to the Autoconf Bugs mailing list. Past bug reports are archived.

也可以发送 错误报告到 Autoconf Bugs 邮件列表中. 过去的错误报告也已归档。

If possible, first check that your bug is not already solved in current development versions, and that it has not been reported yet.

如果可能的话,请先检查您的错误是否还没有在当前开发版本中解决,并且还没有被报告。

Be sure to include all the needed information and a short ‘configure.ac’ that demonstrates the problem.

然后再确保包含所有需要的信息和一个简短的 ‘configure.ac’ 来证明这个问题。


Autoconf’s development tree is accessible via git; see the Autoconf Summary for details, or view the actual repository.

Autoconf 的开发树可以通过git访问; 有关详细信息,请参阅 Autoconf 摘要,或查看实际的代码库。

Anonymous CVS access is also available, see ‘README’ for more details.

匿名CVS访问也可用,有关详细信息,请参阅“README”。

Patches relative to the current git version can be sent for review to the Autoconf Patches mailing list, with discussion on prior patches archived;

可以将相对于当前git版本的补丁发送给 Autoconf Patches 邮件列表进行审阅,并对先前的修补程序进行了讨论;

and all commits are posted in the read-only Autoconf Commit mailing list, which is also archived.

并且所有提交都被投递到只读的 Autoconf Commit 邮件列表中,该列表也已被归档。


Because of its mission, the Autoconf package itself includes only a set of often-used macros that have already demonstrated their usefulness.

由于它的使命,Autoconf 包本身只包含一组经常使用的宏,这些宏已经证明了它们的有效性。

Nevertheless, if you wish to share your macros, or find existing ones, see the Autoconf Macro Archive, which is kindly run by Peter Simons.

不过,如果您希望分享您的宏,或找到现有的宏,请参阅由 Peter Simons 所管理的 Autoconf 宏存档。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/136139.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号