bug-automake
[Top][All Lists]
Advanced

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

Re: conditionally using AC_PROG_CXX


From: Ralf Corsepius
Subject: Re: conditionally using AC_PROG_CXX
Date: 31 Oct 2002 07:01:05 +0100

Am Mit, 2002-10-30 um 13.03 schrieb Akim Demaille:
> 
> | Hi,
> | If using AC_PROG_CXX conditionally (automake-1.7.1 + autoconf-2.54b),
> | configure scripts die at configuration time, without any warning nor
> | error at autoreconf-time.
> | 
> | # autoreconf -f
> | # ./configure
> | checking for a BSD-compatible install... /usr/bin/install -c
> | checking whether build environment is sane... yes
> | checking for gawk... gawk
> | checking whether make sets ${MAKE}... yes
> | configure: error: conditional "AMDEP" was never defined.
> | Usually this means the macro was only invoked conditionally.
> | 
> | Cf. example below.
> 
> Known issue :(  It is the same as this one:
Urgh, I was aware about this issue (IIRC, I even reported it before),
but I didn't expect it to hit with such a trivial configure script,
especially because it had seemed to have work for ages. (I now wouldn't
exclude it had only been by lucky accident).

[For those who didn't look into the tarball, it basically was
if test $condition; then
  AC_PROG_CXX
fi
]

But, I hate to say this, your explanation IMHO is a pretty clear
description of what I consider to be a very severe and basic design flaw
in autoconf, which results into autoconf producing unreliable and
"randomly" functional configure scripts!

I don't think this is acceptable.

AFAIU, the core of this issue are to design problems with autoconf 

1. Simulatiously trying to follow two contradicting programming language
design principles: 
Rule-based vs. procedural programming.
[IMO, autoconf should be nothing but an extended "sed+m4", strictly
performing macro expansion]

2. The "autoconf-language" not being defined, even worse, being a open
language, allowing code-fragments it does not have control about, and
therefore not being able to cope with it.
For example:
if test $condition; then
  AC_PROG_CXX
fi
Autoconf doesn't know anything about the "if/then/endif" and therefore
is not able to deal with it.

Ralf






reply via email to

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