From: Ben Elliston Date: Fri, 30 Oct 1998 03:41:59 +0000 (+0000) Subject: 1998-10-30 Jeff Garzik X-Git-Tag: autoconf-2-13-rc1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd5156267c35ca4321a5465998c91215da5aedd0;p=thirdparty%2Fautoconf.git 1998-10-30 Jeff Garzik * autoconf.texi: Document AC_CACHE_LOAD and AC_CACHE_SAVE. Explain how AC_CACHE_SAVE can be used as a means of syncing the cache to disk prior to doing something potentially fatal in configure. --- diff --git a/ChangeLog b/ChangeLog index 01821072..dccb17e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1998-10-30 Jeff Garzik + + * autoconf.texi: Document AC_CACHE_LOAD and AC_CACHE_SAVE. Explain + how AC_CACHE_SAVE can be used as a means of syncing the cache to + disk prior to doing something potentially fatal in configure. + 1998-10-29 Alexandre Oliva * autoreconf.sh: Support several automake command line options, diff --git a/autoconf.texi b/autoconf.texi index 57fca2d1..47013cb7 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -3552,6 +3552,20 @@ common way to use these macros. It calls @code{AC_MSG_CHECKING} for @var{commands} arguments, and @code{AC_MSG_RESULT} with @var{cache-id}. @end defmac +@defmac AC_CACHE_LOAD +@maindex CACHE_LOAD +Loads values from existing cache file, or creates a new cache file if +a cache file is not found. Called automatically from @code{AC_INIT}. +@end defmac + +@defmac AC_CACHE_SAVE +@maindex CACHE_SAVE +Flushes all cached values to the cache file. Called automatically +from @code{AC_OUTPUT}, but it can be quite useful to call +@code{AC_CACHE_SAVE} at key points in configure.in. Doing so +checkpoints the cache in case of an early configure script abort. +@end defmac + @menu * Cache Variable Names:: Shell variables used in caches. * Cache Files:: Files @code{configure} uses for caching. @@ -3643,6 +3657,31 @@ site-wide cache file to use instead of the default, to make it work transparently, as long as the same C compiler is used every time (@pxref{Site Defaults}). +If your configure script, or a macro called from configure.in, happens to +abort the configure process, it may be useful to checkpoint the cache a +few times at key points. Doing so will reduce the amount of time it +takes to re-run the configure script with (hopefully) the error that +caused the previous abort corrected. + +@example +@r{ ... AC_INIT, etc. ...} +dnl checks for programs +AC_PROG_CC +AC_PROG_GCC_TRADITIONAL +@r{ ... more program checks ...} +AC_CACHE_SAVE + +dnl checks for libraries +AC_CHECK_LIB(nsl, gethostbyname) +AC_CHECK_LIB(socket, connect) +@r{ ... more lib checks ...} +AC_CACHE_SAVE + +dnl Might abort... +AM_PATH_GTK(1.0.2, , exit 1) +AM_PATH_GTKMM(0.9.5, , exit 1) +@end example + @node Printing Messages, , Caching Results, Results @section Printing Messages diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 57fca2d1..47013cb7 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -3552,6 +3552,20 @@ common way to use these macros. It calls @code{AC_MSG_CHECKING} for @var{commands} arguments, and @code{AC_MSG_RESULT} with @var{cache-id}. @end defmac +@defmac AC_CACHE_LOAD +@maindex CACHE_LOAD +Loads values from existing cache file, or creates a new cache file if +a cache file is not found. Called automatically from @code{AC_INIT}. +@end defmac + +@defmac AC_CACHE_SAVE +@maindex CACHE_SAVE +Flushes all cached values to the cache file. Called automatically +from @code{AC_OUTPUT}, but it can be quite useful to call +@code{AC_CACHE_SAVE} at key points in configure.in. Doing so +checkpoints the cache in case of an early configure script abort. +@end defmac + @menu * Cache Variable Names:: Shell variables used in caches. * Cache Files:: Files @code{configure} uses for caching. @@ -3643,6 +3657,31 @@ site-wide cache file to use instead of the default, to make it work transparently, as long as the same C compiler is used every time (@pxref{Site Defaults}). +If your configure script, or a macro called from configure.in, happens to +abort the configure process, it may be useful to checkpoint the cache a +few times at key points. Doing so will reduce the amount of time it +takes to re-run the configure script with (hopefully) the error that +caused the previous abort corrected. + +@example +@r{ ... AC_INIT, etc. ...} +dnl checks for programs +AC_PROG_CC +AC_PROG_GCC_TRADITIONAL +@r{ ... more program checks ...} +AC_CACHE_SAVE + +dnl checks for libraries +AC_CHECK_LIB(nsl, gethostbyname) +AC_CHECK_LIB(socket, connect) +@r{ ... more lib checks ...} +AC_CACHE_SAVE + +dnl Might abort... +AM_PATH_GTK(1.0.2, , exit 1) +AM_PATH_GTKMM(0.9.5, , exit 1) +@end example + @node Printing Messages, , Caching Results, Results @section Printing Messages