autotools:autoreconf 找不到宏,但 aclocal 可以

发布于 2024-09-10 06:27:52 字数 840 浏览 5 评论 0原文

作为一名开发人员,我是第一次尝试使用自动工具,所以请原谅任何新手。

我正在使用 Check 单元测试库,它在 < 中定义了宏 AM_PATH_CHECK code>check.m4,安装在 /usr/local/share/aclocal 中。我设法通过编辑 /usr/share/aclocal/dirlist 以包含 /usr/local/share 来让 aclocal 识别 AM_PATH_CHECK /aclocal

因此,aclocal 运行并干净地返回(无需任何附加参数)。

但是,当我运行 autoreconf --install 时,我收到错误

configure.ac:36: error: possibly undefined macro: AM_PATH_CHECK
      If this token and others are legitimate, please use m4_pattern_allow
      See the Autoconf documentation
autoreconf: /usr/local/bin/autoconf failed with exit status: 1

我做错了什么?我应该如何让 autoreconf 知道 AM_PATH_LOCAL 的存在?

I'm trying to use autotools for the first time as a developer, so excuse any noobishness.

I'm using the Check unit testing library which defines the macro AM_PATH_CHECK in check.m4, which was installed in /usr/local/share/aclocal. I managed to get aclocal to recognize AM_PATH_CHECK by editing /usr/share/aclocal/dirlist to include /usr/local/share/aclocal.

So aclocal runs and returns cleanly (without any additional arguments).

However, when I run autoreconf --install, I get the error

configure.ac:36: error: possibly undefined macro: AM_PATH_CHECK
      If this token and others are legitimate, please use m4_pattern_allow
      See the Autoconf documentation
autoreconf: /usr/local/bin/autoconf failed with exit status: 1

What am I doing wrong? How should I let autoreconf know of the existence of AM_PATH_LOCAL?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的笑 2024-09-17 06:27:52

听起来 Check 本身安装不正确。你应该在那里提交一个错误。要解决此问题,您可以采取的方法是将

AC_CONFIG_MACRO_DIR([m4])

添加到 configure.ac,并添加

ACLOCAL_AMFLAGS += -I m4 code>

Makefile.am,然后将 check.m4 复制到将在项目根目录中创建的 m4 目录。

Sounds like Check is installing itself incorrectly. You should file a bug there. What you can do to work around this problem is to add

AC_CONFIG_MACRO_DIR([m4])

to configure.ac, and add

ACLOCAL_AMFLAGS += -I m4

to Makefile.am, and then copy check.m4 to the m4 directory that will be created in your project's root directory.

凶凌 2024-09-17 06:27:52

我让一位同事帮我解决了这个问题,我们发现问题是 pkg-config 没有安装。 (显然,不是 OSX 的 XCode 工具的一部分)。

我不确定该向谁提交有关此问题的错误 - Check 应该在安装时检查 pkg-confg 吗?应该autoconf吗?或者它是否太标准了以至于我应该向 XCode 工具人员抱怨?

I had one of my peers help me out, and we discovered that the problem was that pkg-config wasn't installed. (Evidently, not part of OSX's XCode tools).

I'm not sure who to file a bug with about this - should Check be checking for pkg-confg when it installs? Should autoconf? Or is it so bog-standard that I should complain to the XCode tools people?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文