This code defines the CHECK_FOO test macro; it is written in the m4 macro language, which when processed generates a shell script code fragment that is incorporated into the configure script. The AC_MSG_CHECKING macro causes configure to print a progress message about what it is looking for - this message does not get a newline at the end. The for loop checks in a series of directories for the foo/foo.h include file. The search list should be chosen to look in all the places the target file might be on different platforms, including those installed from rpm (or equivalent) packages or from source. In this case, all the choices were ones that will be in the default search path for include files, so no manipulation of the path is needed. There are a number of examples in config/general.m4 that do more elaborate searches and set variables used by other parts of the build. The AC_MSG_RESULT macro causes configure to print a success message about where it found the file. The AC_MSG_ERROR macro causes configure to print a failure message, and aborts configure . |