我在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
Run Code Online (Sandbox Code Playgroud)
这已经在我们的项目中很长一段时间了,但在一些设置中,我得到这个错误:
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.
Run Code Online (Sandbox Code Playgroud)
最近在上面添加的行:
AC_CONFIG_MACRO_DIR([m4])
LT_INIT
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释导致此错误的原因以及如何追踪问题?
编辑:添加有关差异的详细信息.
有效的盒子:
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
Run Code Online (Sandbox Code Playgroud)
不起作用的盒子:
Linux host2 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC …Run Code Online (Sandbox Code Playgroud) 我正在尝试从 GutHub 源构建libpsl。它需要一个autoreconf. Autotools 失败:
# Try to reconfigure. Autotools is so broken...
libtoolize --force && aclocal && autoheader && autoreconf --force --install
...
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:62: error: possibly undefined macro: AC_MSG_ERROR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:68: error: possibly undefined macro: AC_MSG_CHECKING
configure.ac:70: error: possibly undefined macro: AC_MSG_RESULT
configure.ac:87: error: possibly undefined macro: AC_LINK_IFELSE
configure.ac:88: error: possibly undefined macro: …Run Code Online (Sandbox Code Playgroud)