带有ax_check_compile_flag的autotools语法错误 [英] autotools syntax error with ax_check_compile_flag

查看:168
本文介绍了带有ax_check_compile_flag的autotools语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用自动工具来构建我的C ++应用程序.在我的 configure.ac 中,有以下一行:

I am using autotools for building my C++ application. In my configure.ac I have the following line:

AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"])

在执行 ./configure (运行 autoreconf -i 后)时会导致以下错误:

which causes the following error when executing ./configure (after running autoreconf -i):

./configure: line 3825: syntax error near unexpected token `-Wall,'
./configure: line 3825: `AX_CHECK_COMPILE_FLAG(-Wall, CPPFLAGS="$CPPFLAGS -Wall")'

我的系统: Linux web 3.2.0-4-amd64#1 SMP Debian 3.2.65-1 + deb7u2 x86_64 GNU/Linux

在我的Ubuntu计算机上,它运行良好,为什么会出现此错误?

On my Ubuntu machine it works well, why do I get this error?

推荐答案

autoreconf并不是魔术(尽管我遇到了显然相信这一点的软件包维护者).当您运行autoreconf时,它找不到AX_CHECK_COMPILE_FLAG宏,并生成了损坏的configure脚本.通常,这会在同一时间产生错误/诊断消息.

autoreconf isn't magic (though I encounter package maintainers who obviously believe this). When you ran autoreconf, it failed to find the AX_CHECK_COMPILE_FLAG macro, and produced a corrupt configure script. Usually that produces an error/diagnostic message at the same time.

"AX_CHECK_COMPILE_FLAG"来自 autoconf存档项目和Debian有一个提供此功能的软件包,名为 autoconf-archive .您可能忘记了安装它:

'AX_CHECK_COMPILE_FLAG` comes from the autoconf archive project, and Debian has a package which provides this, named autoconf-archive. Likely, you forgot to install it:

sudo apt-get install autoconf-archive

这篇关于带有ax_check_compile_flag的autotools语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆