macrosautotoolsautoreconf

autotools: autoreconf can't find macro but aclocal can


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?


Solution

  • 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?