m4 allows included files to be found in other directories
than the current working directory.
If the --prepend-include or -B command-line option was
provided (see Invoking m4), those
directories are searched first, in reverse order that those options were
listed on the command line. Then
m4 looks in the current working
directory. Next comes the directories specified with the
--include or -I option, in the order found on the
command line. Finally, if the
M4PATH environment variable is set,
it is expected to contain a colon-separated list of directories, which
will be searched in order.
If the automatic search for include-files causes trouble, the ‘p’ debug flag (see Debug Levels) can help isolate the problem.