首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >/配置检查vs是否检查

问/配置检查vs是否检查
EN

Unix & Linux用户
提问于 2019-04-27 05:40:01
回答 1查看 73关注 0票数 0

./configure 脚本在执行时输出checking if和checking whether

对于检查条件,这两种结果有何不同?

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-04-27 07:07:44

configure脚本最常使用的是checking whether的措辞,因为这是默认autoconf宏中的默认措辞。

如果一个项目的configure脚本表示checking if,那么这意味着同样的事情,并且可能是由开发人员自己编写(或借用)的自定义测试宏生成的。

例如,在我的机器上配置bash 5.0.7时,我得到了44 checking whether,只有5 checking if。checking if主要来自自定义的测试宏。

代码语言:javascript
复制
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking if dup2 fails to clear the close-on-exec flag... no
checking if opendir() opens non-directories... no
checking if getcwd() will dynamically allocate memory with 0 size... yes
checking if signal handlers must be reinstalled when invoked... no

(这里的第一个实际上不是一个特定于bash的宏,但它仍然来自项目的aclocal.m4文件)

在我维护的一个项目中,我们主要使用来自汽车人档案馆的默认测试宏和宏,其中根本没有checking if,只有65个其他类型的输出。

在一天结束时,两者之间并没有有效的差别,就像他们之间在英语口语上没有真正的差别一样。

票数 2
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/515824

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档