[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: to conditionally test, or not to conditionally test?
From: |
Ralf Corsepius |
Subject: |
Re: to conditionally test, or not to conditionally test? |
Date: |
Fri, 27 May 2005 10:44:16 +0200 |
On Fri, 2005-05-27 at 09:44 +0200, Stepan Kasal wrote:
> Hi,
>
> On Fri, May 27, 2005 at 08:17:58AM +0200, Ralf Corsepius wrote:
> > On Thu, 2005-05-26 at 09:50 +0200, Stepan Kasal wrote:
> > >
> > > The advice ``perform all tests unconditionally'' is a workaround
> > > to fix current limitations of the implementation.
> ...
> >
> > It actually should be "perform all tests for compilers unconditionally",
> > i.e. try using AC_PROG_<language> unconditionally, because autoconf
> > can't handle "using AC_PROG_<language> conditionally".
>
> I wouldn't say so.
>
> The problem is that if macro BAR contains AC_REQUIRE([FOO]), then FOO
> is expanded inside the `if' and may escape execution.
True, ...
> It's hard to tell whether a macro calls AC_REQUIRE. (It can call it
> indirectly.)
True, ... but ...
... in practice in most cases AC_PROG_<language> will be close to the
beginning of a configure script before "feature checks". So unless you
are doing something nasty, this in most cases works around the
AC_REQUIRE issue. If this wasn't the case, autoconf would completely
unusable.
However, autoconf apparently is usable, because the AC_REQUIRE issue
rarely shows effect ...
> A real fix will be to use shell functions to reimplement AC_REUIRE,
> in autoconf-3.
... otherwise autoconf-3 would already be existing ...
Ralf
- to conditionally test, or not to conditionally test?, Ed Hartnett, 2005/05/20
- Re: to conditionally test, or not to conditionally test?, Ralf Wildenhues, 2005/05/25
- Re: to conditionally test, or not to conditionally test?, Stepan Kasal, 2005/05/26
- Re: to conditionally test, or not to conditionally test?, Ralf Corsepius, 2005/05/27
- Re: to conditionally test, or not to conditionally test?, Stepan Kasal, 2005/05/27
- Re: to conditionally test, or not to conditionally test?,
Ralf Corsepius <=
- Re: to conditionally test, or not to conditionally test?, Stepan Kasal, 2005/05/27