【发布时间】:2012-02-07 08:14:11
【问题描述】:
我在 configure.ac 中有以下内容:
AC_CHECK_PROGS(MAKE,$MAKE make gmake,error)
if test "x$MAKE" = "xerror" ;then
AC_MSG_ERROR([cannot find a make command])
fi
这在我们的项目中已经存在很长时间了,但是在某些设置中,我得到了这个错误:
configure.ac:45: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
最近在此上方添加的行:
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
谁能解释导致此错误的原因以及如何追踪问题?
编辑:添加有关差异的详细信息。
有效的盒子:
uname -a Linux host1 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
automake: 1.11.1
autoconf: 2.67
m4: 1.4.14
libtoolize: 2.2.6b
不工作的盒子:
Linux host2 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC 2011 i686 GNU/Linux
automake: 1.11.1
autoconf: 2.65
m4: 1.4.13
libtoolize: 2.2.6b
新编辑:只有 32 位机器会遇到这种困难。
已更新我可以在 CentOS 机器上使用 autoconf 2.67、automake 1.11.1、libtool 2.2.6b 和 m4 1.4.14 重现该问题。这只是 32 位机器的错误吗?
【问题讨论】:
-
为什么会出现这个问题?使用 autoconf 2.67 构建您的 tarball。你只需要在一台机器上安装 autoconf!
-
我知道我可以轻松解决这个问题,我只是想确保它是一个盒子的问题,而不是我们的 configure.ac 或其他配置文件中的问题。跨度>
-
我知道 autoconf 2.64 被认为是相当有缺陷的。您可能遇到了 2.65 中的错误。
-
我能够在另一台具有 autoconf 2.67、automake 1.11.1、libtool 2.2.6b 和 m4 1.4.14 的 32 位机器上重现该问题
-
我无法想象这会有所帮助:但是您尝试过 AC_CHECK_PROGS([MAKE],[$MAKE make gmake],[error]) 吗?这听起来绝对像是 m4 的问题,完全引用 m4 的内容只会有所帮助。这条特定的行可能不是罪魁祸首,但它在某处闻起来像是引用问题。你能发布完整的configure.ac吗?