manpagez: man pages & more
info autoconf
Home | html | info | man

File: autoconf.info,  Node: Cache Variable Names,  Next: Cache Files,  Up: Caching Results

7.4.1 Cache Variable Names
--------------------------

The names of cache variables should have the following format:

     PACKAGE-PREFIX_cv_VALUE-TYPE_SPECIFIC-VALUE_[ADDITIONAL-OPTIONS]

for example, ‘ac_cv_header_stat_broken’ or ‘ac_cv_prog_gcc_traditional’.
The parts of the variable name are:

PACKAGE-PREFIX
     An abbreviation for your package or organization; the same prefix
     you begin local Autoconf macros with, except lowercase by
     convention.  For cache values used by the distributed Autoconf
     macros, this value is ‘ac’.

‘_cv_’
     Indicates that this shell variable is a cache value.  This string
     _must_ be present in the variable name, including the leading
     underscore.

VALUE-TYPE
     A convention for classifying cache values, to produce a rational
     naming system.  The values used in Autoconf are listed in *note
     Macro Names::.

SPECIFIC-VALUE
     Which member of the class of cache values this test applies to.
     For example, which function (‘alloca’), program (‘gcc’), or output
     variable (‘INSTALL’).

ADDITIONAL-OPTIONS
     Any particular behavior of the specific member that this test
     applies to.  For example, ‘broken’ or ‘set’.  This part of the name
     may be omitted if it does not apply.

   The values assigned to cache variables may not contain newlines.
Usually, their values are Boolean (‘yes’ or ‘no’) or the names of files
or functions; so this is not an important restriction.  *note Cache
Variable Index:: for an index of cache variables with documented
semantics.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.