bug-gnulib
[Top][All Lists]
Advanced

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

Re: Possible bug in configure script


From: Bruno Haible
Subject: Re: Possible bug in configure script
Date: Tue, 26 Jan 2021 18:32:49 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; )

Jeffrey Walton wrote:
> > Jeffrey Walton wrote:
> > > Placing flags in CC breaks other scripts. For example, this no longer 
> > > works:
> > >
> > >     if [[ ! $(command -v "${CC}") ]]; then
> > >         echo "The compiler is not valid. Please install a compiler."
> > >         exit 1
> > >     fi
> >
> > Such scripts are not supported.
> 
> I actually do that in my configure.ac. Quality user feedback is more
> important

No one disputes that. But you can correct your code to support a $CC value
with arguments:
          set x $CC
          if (type $1) >/dev/null 2>/dev/null; ....

> > Some flags, like '-m32' or '-m64', MUST be put in $CC. [1]
> 
> I place them where they belong - in CFLAGS and CXXFLAGS. The downside
> is you have to pick the triplet on Solaris and a few other platforms.

Exactly that's the reason why we documented it this way in Autoconf:
The triplet detection does not work right if a user puts '-m32' or '-m64'
in $CFLAGS or $CPPFLAGS.

> Working around the Autotools bugs just means they will never get
> fixed. They will keep telling the world to work around their bugs.

You can have a different opinion about how the Autotools should behave.
But once we have documented how they behave and what a user needs to
do in order to get good results, it's not a "bug" any more.

Bruno




reply via email to

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