[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using ACE_CACHE_CHECK with ACE_ARG_ENABLE/ACE_ARG_WITH?
From: |
J.T. Conklin |
Subject: |
Using ACE_CACHE_CHECK with ACE_ARG_ENABLE/ACE_ARG_WITH? |
Date: |
Wed, 08 Mar 2006 14:34:43 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, berkeley-unix) |
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])])
I've seen this idiom of using AC_CACHE_CHECK after AC_ARG_ENABLE and
ACE_ARG_WITH elsewhere, but I do not really understand what benefits
caching brings. For example, in the above ac_cv_use_foo is going to
be set one way or the other before the call to AC_CACHE_CHECK, so the
COMMANDS-TO-SET-IT will never be invoked.
If the point is to print a message, why not use something like:
AC_MSG_CHECKING([whether to use foo])
AC_MSG_RESULT($ac_cv_use_foo)
?
--jtc
--
J.T. Conklin
- Using ACE_CACHE_CHECK with ACE_ARG_ENABLE/ACE_ARG_WITH?,
J.T. Conklin <=