Hello,
On Tue, Mar 14, 2006 at 08:38:04AM +0100, Ralf Wildenhues wrote:
> * J.T. Conklin wrote on Wed, Mar 08, 2006 at 11:34:43PM CET:
> > The autoconf manual has the following example for AS_HELP_STRING:
> >
> > AC_DEFUN([TEST_MACRO],
> > [AC_ARG_WITH([foo],
> > AS_HELP_STRING([--with-foo],
> > [use foo (default is NO)]),
> > [ac_cv_use_foo=$withval], [ac_cv_use_foo=no])
> > AC_CACHE_CHECK([whether to use foo],
> > [ac_cv_use_foo], [ac_cv_use_foo=no])])
> >
> > [...], but I do not really understand what benefits caching brings.
...
> I agree. I think the example is bogus. [...]
the example was partialy fixed in the CVS version, but it still used the
cached variables.
I committed the patch attached below.
Stepan
2006-03-15 Stepan Kasal <[EMAIL PROTECTED]>
* doc/autoconf.texi (Pretty Help Strings): No need to use cached
variables in the examples.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.965
diff -u -r1.965 autoconf.texi
--- doc/autoconf.texi 14 Mar 2006 16:55:27 -0000 1.965
+++ doc/autoconf.texi 15 Mar 2006 13:58:18 -0000
@@ -14260,8 +14260,8 @@
AC_ARG_WITH([foo],
[AS_HELP_STRING([--with-foo],
[use foo (default is no)])],
- [ac_cv_use_foo=$withval],
- [ac_cv_use_foo=no])
+ [use_foo=$withval],
+ [use_foo=no])
@end example
The second argument of @code{AS_HELP_STRING} is
@@ -14283,8 +14283,8 @@
AC_DEFUN([MY_ARG_WITH],
[AC_ARG_WITH([$1],
[AS_HELP_STRING([--with-$1], [use $1 (default is $2)])],
- [ac_cv_use_[]$1=$withval],
- [ac_cv_use_[]$1=$2])])
+ [use_[]$1=$withval],
+ [use_[]$1=$2])])
@end example
@end defmac
_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf