我有一个configure.ac ,其中我通过不同的配置选项启用不同的编译器。 configure脚本生成成功,但最后(调用AC_OUTPUT )我收到一条错误消息:
configure: error: conditional "AMDEP" was never defined. Usually this means the macro was only invoked conditionally.遗憾地查看config.log没有帮助,我不知道是什么原因导致此错误或从哪里开始搜索。
I have a configure.ac in which I enable different compilers by different configure options. The configure script is generated successfully but at the end (call to AC_OUTPUT) I get an error message:
configure: error: conditional "AMDEP" was never defined. Usually this means the macro was only invoked conditionally.Sadly looking into config.log does not help and I have no idea what causes this error or where to start searching.
最满意答案
显然你不能在if块中嵌入AM_PROG_CC , AM_PROG_CPP或AM_PROG_CXX (无论出于何种原因)。 解决方案是在if块中设置一个变量并将其传递给AM_PROG_ *。
Apparently you cannot embed AM_PROG_CC, AM_PROG_CPP or AM_PROG_CXX in an if block (for whatever reason). Solution was to set a variable in the if block and pass it to AM_PROG_*.
更多推荐
发布评论