4

While modifying this source code I got this error from 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

The line in configure.ac is:

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

Is this a problem with the version of the autoconf/automake tool I'm using, or something else?

Thanks.

Dean Schulze
  • 9,633
  • 24
  • 100
  • 165

1 Answers1

5

I did following on Centos8:

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

to findout the directory containing 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]]]])

Issuing

export ACLOCAL_PATH=/usr/share/aclocal

solved the problem

SzB
  • 1,027
  • 10
  • 12