Akim Demaille writes:

> In addition, the style you used is very much 2.13 like, but it is
> completely different from the style used for CVS Autoconf.  You can
> delete almost all your `dnl's, use `#' for comments, not `dnl' etc.
> Finally, you used changequote, which is eradicated from Autoconf, or
> almost.

The style I used is much like anything between 2.0 and 2.13. I didn't
know that autoconf 3.0 would be that different.

> There's a lot of hair which is due to the fact that you want to
> cache low level details, such as what you computed.  I think this is
> not right, you should cache what you look for

What you say here is not always followed in current practice. For example,
here is a piece of macro Jim Meyering sent me today.

  if test -z "$ac_list_mounted_fs"; then
    # BeOS
    AC_CHECK_FUNCS(next_dev fs_stat_dev)
    AC_CHECK_HEADERS(fs_info.h)
    AC_MSG_CHECKING([for BEOS mounted file system support functions])
    if test $ac_cv_header_fs_info_h = yes \
        && test $ac_cv_func_next_dev = yes \
        && test $ac_cv_func_fs_stat_dev = yes; then
      fu_result=yes
    else
      fu_result=no
    fi
    AC_MSG_RESULT($fu_result)
    if test $fu_result = yes; then
      ac_list_mounted_fs=found
      AC_DEFINE(MOUNTED_NEXT_DEV, 1,
        [Define if there are functions named next_dev and fs_stat_dev for
     reading the list of mounted filesystems.  (BeOS)])
    fi
  fi

As you can see, it uses three elementary tests, for next_dev(), fs_stat_dev(),
and <fs_info.h>, each with a separate cache variable, and then infers the
result. The result (whether MOUNTED_NEXT_DEV should be defined) is not
cached. This doesn't hurt, because the few 'test' statements to recompute it
from the 3 cache values are cheap.

The motivation for caching at the level of one compiler invocation is that
the test result may be reused by different high-level tests in the same
configure script. It would be very annoying if AM_GNU_GETTEXT and other
big tests couldn't share their results with other pieces of the same script.

> that's way too much hair for Autoconf.

Then please simplify it. I made the best macro I could do. If you have
different ideas how it should be done, please improve it.

Bruno

Reply via email to