[英]autotools syntax error with ax_check_compile_flag
I am using autotools for building my C++ application. 我正在使用autotools来构建我的C ++应用程序。 In my configure.ac I have the following line:
在我的configure.ac中,我有以下行:
AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"])
which causes the following error when executing ./configure (after running autoreconf -i ): 执行./configure (运行autoreconf -i之后 )会导致以下错误:
./configure: line 3825: syntax error near unexpected token `-Wall,'
./configure: line 3825: `AX_CHECK_COMPILE_FLAG(-Wall, CPPFLAGS="$CPPFLAGS -Wall")'
My system: Linux web 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux 我的系统: Linux web 3.2.0-4-amd64#1 SMP Debian 3.2.65-1 + deb7u2 x86_64 GNU / Linux
On my Ubuntu machine it works well, why do I get this error? 在我的Ubuntu机器上运行良好,为什么我会收到此错误?
autoreconf
isn't magic (though I encounter package maintainers who obviously believe this). autoreconf
并不神奇(虽然我遇到明显相信这个的软件包维护者)。 When you ran autoreconf
, it failed to find the AX_CHECK_COMPILE_FLAG
macro, and produced a corrupt configure
script. 运行
autoreconf
,无法找到AX_CHECK_COMPILE_FLAG
宏,并生成了损坏的configure
脚本。 Usually that produces an error/diagnostic message at the same time. 通常,它会同时产生错误/诊断消息。
'AX_CHECK_COMPILE_FLAG` comes from the autoconf archive project, and Debian has a package which provides this, named autoconf-archive . 'AX_CHECK_COMPILE_FLAG`来自autoconf归档项目,Debian有一个提供此命名的包,名为autoconf-archive 。 Likely, you forgot to install it:
可能,你忘了安装它:
sudo apt-get install autoconf-archive
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.