Next: , Previous: Conclusion and References, Up: Top



6 AM_PATH_CHECK

The AM_PATH_CHECK() macro is defined in the file check.m4 which is installed by Check. It has some optional parameters that you might find useful in your configure.ac:

AM_PATH_CHECK([MINIMUM-VERSION,
               [ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]])

AM_PATH_CHECK does several things:

  1. It ensures check.h is available
  2. It ensures a compatible version of Check is installed
  3. It sets CHECK_CFLAGS and CHECK_LIBS for use by Automake.

If you include AM_PATH_CHECK() in configure.ac and subsequently see warnings when attempting to create configure, it probably means one of the following things:

  1. You forgot to call aclocal. autoreconf will do this for you.
  2. aclocal can't find check.m4. Here are some possible solutions:
    1. Call aclocal with -I set to the location of check.m4. This means you have to call both aclocal and autoreconf.
    2. Add the location of check.m4 to the dirlist used by aclocal and then call autoreconf. This means you need permission to modify the dirlist.
    3. Set ACLOCAL_AMFLAGS in your top-level Makefile.am to include -I DIR with DIR being the location of check.m4. Then call autoreconf.