Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Previous: Cache Files, Up: Caching Results

7.4.3 Cache Checkpointing

If your configure script, or a macro called from configure.ac, happens to abort the configure process, it may be useful to checkpoint the cache a few times at key points using AC_CACHE_SAVE. Doing so reduces the amount of time it takes to rerun the configure script with (hopefully) the error that caused the previous abort corrected.

— Macro: AC_CACHE_LOAD

Loads values from existing cache file, or creates a new cache file if a cache file is not found. Called automatically from AC_INIT.

— Macro: AC_CACHE_SAVE

Flushes all cached values to the cache file. Called automatically from AC_OUTPUT, but it can be quite useful to call AC_CACHE_SAVE at key points in configure.ac.

For instance:

      ... AC_INIT, etc. ...
     # Checks for programs.
     AC_PROG_CC
     AC_PROG_AWK
      ... more program checks ...
     AC_CACHE_SAVE
     
     # Checks for libraries.
     AC_CHECK_LIB([nsl], [gethostbyname])
     AC_CHECK_LIB([socket], [connect])
      ... more lib checks ...
     AC_CACHE_SAVE
     
     # Might abort...
     AM_PATH_GTK([1.0.2], [], [AC_MSG_ERROR([GTK not in path])])
     AM_PATH_GTKMM([0.9.5], [], [AC_MSG_ERROR([GTK not in path])])
      ... AC_OUTPUT, etc. ...

 
 
  Published under the terms of the GNU General Public License Design by Interspire