* Declarations:: Declarations that may be missing
* Structures:: Structures or members that might be missing
* Types:: Types that might be missing
-* Compilers and Preprocessors:: Checks for compiling programs
+* Compilers and Preprocessors:: Checking for compiling programs
* System Services:: Operating system services
* UNIX Variants:: Special kludges for specific UNIX variants
* Multiple Cases:: Tests for several possible values
* Language Choice:: Selecting which language to use for testing
-Checking Run-Time Behavior
+Checking Run Time Behavior
* Test Programs:: Running test programs
* Guidelines:: General rules for writing test programs
* M4 Quotation:: Protecting macros from unwanted expansion
* Invoking autom4te:: The Autoconf executables backbone
* Programming in M4sugar:: Convenient pure M4 macros
-* Programming in M4sh:: Common shell constructs
+* Programming in M4sh:: Common shell Constructs
M4 Quotation
-* Active Characters:: Characters that change the behavior of m4
+* Active Characters:: Characters that change the behavior of M4
* One Macro Call:: Quotation and one macro call
* Quotation and Nested Macros:: Macros calling macros
* Changequote is Evil:: Worse than INTERCAL: M4 + changequote
* Bootstrapping:: Autoconf and GNU M4 require each other?
* Why Not Imake:: Why GNU uses @command{configure} instead of Imake
* Defining Directories:: Passing @code{datadir} to program
+* autom4te.cache:: What is it? Can I remove it?
History of Autoconf
* Bootstrapping:: Autoconf and GNU M4 require each other?
* Why Not Imake:: Why GNU uses @command{configure} instead of Imake
* Defining Directories:: Passing @code{datadir} to program
+* autom4te.cache:: What is it? Can I remove it?
@end menu
@node Distributing
@end itemize
+@node autom4te.cache
+@section What is @file{autom4te.cache}?
+
+@display
+What is this directory @file{autom4te.cache}? Can I safely remove it?
+@end display
+
+In the GNU Build System, @file{configure.ac} plays a central role and is
+read by many tools: @command{autoconf} to create @file{configure},
+@command{autoheader} to create @file{config.h.in}, @command{automake} to
+create @file{Makefile.in}, @command{autoscan} to check the completeness
+of @file{configure.ac}, @command{autoreconf} to check the GNU Build
+System components that are used. To ``read @file{configure.ac}''
+actually means to compile it with M4, which can be a very long process
+for complex @file{configure.ac}.
+
+This is why all these tools, instead of running directly M4, invoke
+@command{autom4te} (@pxref{Invoking autom4te}) which, while answering to
+a specific demand, stores additional information in
+@file{autom4te.cache} for future runs. For instance, if you run
+@command{autoconf}, behind the scenes, @command{autom4te} will also
+store information for the other tools, so that when you invoke
+@command{autoheader} or @command{automake} etc., re-processing
+@file{configure.ac} is not needed. The speed up is frequently of 30,
+and is increasing with the size of @file{configure.ac}.
+
+But it is and remains being simply a cache: you can safely remove it.
+
+
@c ===================================================== History of Autoconf.
# -------------------------
# The prologue for Autoconf macros.
m4_define([_m4_defun_pro],
-[m4_expansion_stack_push(m4_defn([m4_location($1)])[: $1 is expanded from...])dnl
-m4_pushdef([_m4_expanding($1)])dnl
-m4_ifdef([_m4_divert_dump],
- [m4_divert_push(m4_defn([_m4_divert_diversion]))],
- [m4_copy([_m4_divert_diversion], [_m4_divert_dump])dnl
-m4_divert_push([GROW])])dnl
+[
])
# The Epilogue for Autoconf macros. MACRO-NAME only helps tracing
# the PRO/EPI pairs.
m4_define([_m4_defun_epi],
-[m4_divert_pop()dnl
-m4_if(_m4_divert_dump, _m4_divert_diversion,
- [m4_undivert([GROW])dnl
-m4_undefine([_m4_divert_dump])])dnl
-m4_expansion_stack_pop()dnl
-m4_popdef([_m4_expanding($1)])dnl
-m4_provide([$1])dnl
+[m4_provide([$1])dnl
])
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
# it passes to `AC_LANG_COMPILER(C)'.
m4_define([m4_require],
-[m4_expansion_stack_push(m4_location[: $1 is required by...])dnl
-m4_ifdef([_m4_expanding($1)],
- [m4_fatal([$0: circular dependency of $1])])dnl
-m4_ifndef([_m4_divert_dump],
- [m4_fatal([$0: cannot be used outside of an m4_defun'd macro])])dnl
-m4_provide_if([$1],
+[m4_provide_if([$1],
[],
- [m4_divert_push(m4_eval(m4_divnum - 1))dnl
-m4_default([$2], [$1])
-m4_divert(m4_defn([_m4_divert_dump]))dnl
-m4_undivert(m4_defn([_m4_divert_diversion]))dnl
-m4_divert_pop(m4_defn([_m4_divert_dump]))])dnl
-m4_provide_if([$1],
- [],
- [m4_warn([syntax],
- [$1 is m4_require'd but is not m4_defun'd])])dnl
-m4_expansion_stack_pop()dnl
+ [m4_default([$2], [$1])])
])