可能未定义的宏:AC_MSG_ERROR [英] possibly undefined macro: AC_MSG_ERROR

查看:197
本文介绍了可能未定义的宏:AC_MSG_ERROR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

configure.ac中包含以下内容:

I have the following in 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

这已经存在于我们的项目中很长时间了,但是在某些设置中,我得到了这个错误:

This has been in our project for a long time, but in some set ups, I get this error:

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.

最近在此上方添加的行:

The lines that were recently added above this:

AC_CONFIG_MACRO_DIR([m4])
LT_INIT

任何人都可以解释导致此错误的原因以及如何找出问题的原因吗?

Can anyone explain what causes this error and how to track down the problem?

编辑:添加有关差异的详细信息.

Adding details about the differences.

有效的框:

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位计算机遇到此困难.

NEW only 32 bit machines experience this difficulty.

更新我可以在具有autoconf 2.67automake 1.11.1libtool 2.2.6bm4 1.4.14的CentOS计算机上重现该问题.这仅仅是32位计算机的错误吗?

UPDATED I am able to reproduce the problem on a CentOS machine with autoconf 2.67, automake 1.11.1, libtool 2.2.6b, and m4 1.4.14. Is this just a bug with 32-bit machines?

推荐答案

我遇到了同样的问题,发现缺少pkg-config软件包.

I had this same issue and found that pkg-config package was missing.

安装软件包后,所有内容都会正确生成.

After installing the package, everything generated correctly.

这篇关于可能未定义的宏:AC_MSG_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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