O'Reilly logo

Autotools by John Calcote

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Common Problem with Autoconf

We should take this opportunity to address a particular problem that developers new to the Autotools consistently encounter. Here's the formal definition of AC_CHECK_PROG, as you will find it in the GNU Autoconf Manual:

AC_CHECK_PROG(variable, prog-to-check-for, value-if-found,
    [value-if-not-found], [path], [reject])

Check whether program prog-to-check-for exists in path. If it is found, set variable to value-if-found, otherwise to value-if-not-found, if given. Always pass over reject (an absolute filename) even if it is the first found in the search path; in that case, set variable using the absolute filename of the prog-to-check-for found that is not reject. If variable was already set, do nothing. Calls AC_SUBST ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required