1

在修改此源代码时,我从以下位置收到此错误autoreconf

$ autoreconf
configure.ac:240: warning: macro 'AM_PATH_GLIB_2_0' not found in library
configure.ac:246: warning: macro 'AM_PATH_GTK_2_0' not found in library
configure.ac:240: error: possibly undefined macro: AM_PATH_GLIB_2_0
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:246: error: possibly undefined macro: AM_PATH_GTK_2_0
autoreconf: /usr/bin/autoconf failed with exit status: 1

中的行configure.ac是:

AM_PATH_GLIB_2_0([2.7.1], [ac_glib_test="yes"], [ac_glib_test="no"], [gthread])

这是我使用的 autoconf/automake 工具版本的问题,还是其他问题?

谢谢。

4

1 回答 1

1

我在 Centos8 上做了以下操作:

sudo find /usr /opt -name "*.m4" -exec grep -H AM_PATH_GLIB_2_0 {} \;

找出包含 glib-2.0.m4 的目录

/usr/share/aclocal/glib-2.0.m4:dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])

发行

export ACLOCAL_PATH=/usr/share/aclocal

解决了问题

于 2020-12-14T20:11:53.840 回答