autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 4/5] Documentation of specific and general cache variables.


From: Bruno Haible
Subject: Re: [PATCH 4/5] Documentation of specific and general cache variables.
Date: Sun, 4 Oct 2009 19:31:05 +0200
User-agent: KMail/1.9.9

Hi Ralf,

>  @defmac AC_PROG_GREP
>  @acindex{PROG_GREP}
>  @ovindex GREP
> address@hidden prog_GREP
>  Look for the best available @code{grep} or @code{ggrep} that accepts the
>  longest input lines possible, and that supports multiple @option{-e} options.
>  Set the output variable @code{GREP} to whatever is chosen.
>  @xref{grep, , Limitations of Usual Tools}, for more information about
> -portability problems with the @command{grep} command family.
> +portability problems with the @command{grep} command family.  The result
> +is cached in the @code{ac_cv_path_GREP} variable.
>  @end defmac

I fear that by reading this, people think that using $ac_cv_path_GREP is
preferred to using $GREP.

Recall that the reason to document the cache variables is
  1) to tell people how to override the results (from the command line
     invocation of configure, or through config.site),
  2) to legitimize the use of e.g. ac_cv_func_foo for autoconf macros
     which have no documented output/result variable - but only for these!

So I propose to reformulate the sentence about the cache variable for those
macros which already have a documented output variable.

Note also that the cache variable for AC_PROG_SED is ac_cv_path_SED, not
ac_cv_prog_SED. And ac_cv_func_getmntent is used as a result variable of
AC_FUNC_GETMNTENT, not as a cache variable name.


2009-10-04  Bruno Haible  <address@hidden>

        * doc/autoconf.texi (AC_PROG_AWK, AC_PROG_GREP, AC_PROG_EGREP,
        AC_PROG_FGREP, AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_LEX,
        AC_PROG_YACC, AC_CHECK_PROG, AC_CHECK_PROGS, AC_PATH_PROG,
        AC_PATH_PROGS): Don't suggest to use the cache variable, only to 
override it.
        (AC_PROG_SED): Likewise. Fix name of cache variable.
        (AC_FUNC_GETMNTENT): Fix name cache variable.
        (AC_FUNC_LSTAT): Fix typo.

--- doc/autoconf.texi.orig      2009-10-04 19:23:44.000000000 +0200
+++ doc/autoconf.texi   2009-10-04 18:44:58.000000000 +0200
@@ -3873,8 +3873,8 @@
 Check for @code{gawk}, @code{mawk}, @code{nawk}, and @code{awk}, in that
 order, and set output variable @code{AWK} to the first one that is found.
 It tries @code{gawk} first because that is reported to be the
-best implementation.  The result is cached in the @code{ac_cv_prog_AWK}
-variable.
+best implementation.  The result can be overridden by setting the
+variable @code{AWK} or the cache variable @code{ac_cv_prog_AWK}.
 @end defmac
 
 @defmac AC_PROG_GREP
@@ -3886,7 +3886,7 @@
 Set the output variable @code{GREP} to whatever is chosen.
 @xref{grep, , Limitations of Usual Tools}, for more information about
 portability problems with the @command{grep} command family.  The result
-is cached in the @code{ac_cv_path_GREP} variable.
+can be overridden by setting the cache variable @code{ac_cv_path_GREP}.
 @end defmac
 
 @defmac AC_PROG_EGREP
@@ -3896,7 +3896,7 @@
 Check whether @code{$GREP -E} works, or else look for the best available
 @code{egrep} or @code{gegrep} that accepts the longest input lines possible.
 Set the output variable @code{EGREP} to whatever is chosen.  The result
-is cached in the @code{ac_cv_path_EGREP} variable.
+can be overridden by setting the cache variable @code{ac_cv_path_EGREP}.
 @end defmac
 
 @defmac AC_PROG_FGREP
@@ -3906,7 +3906,7 @@
 Check whether @code{$GREP -F} works, or else look for the best available
 @code{fgrep} or @code{gfgrep} that accepts the longest input lines possible.
 Set the output variable @code{FGREP} to whatever is chosen.  The result
-is cached in the @code{ac_cv_path_FGREP} variable.
+can be overridden by setting the cache variable @code{ac_cv_path_FGREP}.
 @end defmac
 
 @defmac AC_PROG_INSTALL
@@ -3949,8 +3949,8 @@
 @code{AC_PROG_INSTALL}; just put the file name of your program into your
 @file{Makefile.in} files.
 
-The result of the test is cached in the @code{ac_cv_path_install} variable,
-if an @command{install} program other than the in-tree script is found.
+The result of the test can be overridden by setting the variable
address@hidden or the cache variable @code{ac_cv_path_install}.
 @end defmac
 
 @defmac AC_PROG_MKDIR_P
@@ -3988,8 +3988,8 @@
 @samp{@@MKDIR_P@@} is special, as its value may vary for different
 configuration files.
 
-The result of the test is cached in the @code{ac_cv_path_mkdir} variable,
-if a @command{mkdir} program other than an in-tree script is found.
+The result of the test can be overridden by setting the variable
address@hidden or the cache variable @code{ac_cv_path_mkdir}.
 @end defmac
 
 @anchor{AC_PROG_LEX}
@@ -4050,7 +4050,8 @@
 As part of running the test, this macro may delete any file in the
 configuration directory named @file{lex.yy.c} or @file{lexyy.c}.
 
-The result of this test is cached in the @code{ac_cv_prog_LEX} variable.
+The result of this test can be influenced by setting the variable
address@hidden or the cache variable @code{ac_cv_prog_LEX}.
 @end defmac
 
 @anchor{AC_PROG_LN_S}
@@ -4092,13 +4093,14 @@
 @defmac AC_PROG_SED
 @acindex{PROG_SED}
 @ovindex SED
address@hidden prog_SED
address@hidden path_SED
 Set output variable @code{SED} to a Sed implementation that conforms to
 Posix and does not have arbitrary length limits.  Report an error if no
 acceptable Sed is found.  @xref{sed, , Limitations of Usual Tools}, for more
 information about portability problems with Sed.
 
-The result of this test is cached in the @code{ac_cv_prog_SED} variable.
+The result of this test can be overridden by setting the cache variable
address@hidden
 @end defmac
 
 @defmac AC_PROG_YACC
@@ -4110,7 +4112,8 @@
 If @code{bison} is found, set output variable @code{YACC} to @samp{bison
 -y}.  Otherwise, if @code{byacc} is found, set @code{YACC} to
 @samp{byacc}.  Otherwise set @code{YACC} to @samp{yacc}.
-The result of this test is cached in the @code{ac_cv_prog_YACC} variable.
+The result of this test can be influenced by setting the variable
address@hidden or the cache variable @code{ac_cv_prog_YACC}.
 @end defmac
 
 @node Generic Programs
@@ -4147,8 +4150,9 @@
 that case, set @var{variable} using the absolute file name of the
 @var{prog-to-check-for} found that is not @var{reject}.  If
 @var{variable} was already set, do nothing.  Calls @code{AC_SUBST} for
address@hidden  The result of this test is cached in the
address@hidden@var{variable}} variable.
address@hidden  The result of this test can be overridden by setting the
+variable @var{variable} or the cache variable
address@hidden@var{variable}}.
 @end defmac
 
 @anchor{AC_CHECK_PROGS}
@@ -4163,7 +4167,8 @@
 list are found, set @var{variable} to @var{value-if-not-found}; if
 @var{value-if-not-found} is not specified, the value of @var{variable}
 is not changed.  Calls @code{AC_SUBST} for @var{variable}.  The result of
-this test is cached in the @address@hidden variable.
+this test can be overridden by setting the variable @var{variable} or the
+cache variable @address@hidden
 @end defmac
 
 @defmac AC_CHECK_TARGET_TOOL (@var{variable}, @var{prog-to-check-for}, @
@@ -4245,8 +4250,9 @@
 @acindex{PATH_PROG}
 @caindex address@hidden
 Like @code{AC_CHECK_PROG}, but set @var{variable} to the absolute
-name of @var{prog-to-check-for} if found.  A positive result of this
-test is cached in the @address@hidden variable.
+name of @var{prog-to-check-for} if found.  The result of this test
+can be overridden by setting the cache variable
address@hidden@var{variable}}.
 @end defmac
 
 @anchor{AC_PATH_PROGS}
@@ -4256,7 +4262,8 @@
 @caindex address@hidden
 Like @code{AC_CHECK_PROGS}, but if any of @var{progs-to-check-for}
 are found, set @var{variable} to the absolute name of the program
-found.
+found.  The result of this test can be overridden by setting the cache
+variable @address@hidden
 @end defmac
 
 @defmac AC_PATH_PROGS_FEATURE_CHECK (@var{variable}, @
@@ -5000,14 +5007,16 @@
 @cvindex HAVE_GETMNTENT
 @c @fuindex getmntent
 @prindex @code{getmntent}
address@hidden func_getmntent
address@hidden search_getmntent
 Check for @code{getmntent} in the standard C library, and then in the
 @file{sun}, @file{seq}, and @file{gen} libraries, for @sc{unicos},
 @sc{irix} 4, @sc{ptx}, and UnixWare, respectively.  Then, if
address@hidden is available, define @code{HAVE_GETMNTENT}.
address@hidden is available, define @code{HAVE_GETMNTENT} and set
address@hidden to @code{yes}.  Otherwise set
address@hidden to @code{no}.
 
-The result of this macro is cached in the @code{ac_cv_func_getmntent}
-variable.
+The result of this macro can be overridden by setting the cache variable
address@hidden
 @end defmac
 
 @defmac AC_FUNC_GETPGRP
@@ -5260,7 +5269,7 @@
 
 The results of these macros are cached in the
 @code{ac_cv_func_stat_empty_string_bug} and the
address@hidden variables, respectively.
address@hidden variables, respectively.
 
 These macros are obsolescent, as no current systems have the bug.
 New programs need not use these macros.
@@ -5892,7 +5901,7 @@
 determine whether the system has conforming header files (and probably C
 library functions).
 
-This macro caches its results in the @code{ac_cv_header_stdc} variable.
+This macro caches its result in the @code{ac_cv_header_stdc} variable.
 
 This macro is obsolescent, as current systems have conforming header
 files.  New programs need not use this macro.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]