./configure 脚本在执行时输出checking if和checking whether
对于检查条件,这两种结果有何不同?
发布于 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主要来自自定义的测试宏。
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个其他类型的输出。
在一天结束时,两者之间并没有有效的差别,就像他们之间在英语口语上没有真正的差别一样。
https://unix.stackexchange.com/questions/515824
复制相似问题