bug-readline
[Top][All Lists]
Advanced

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

Re: readline does not compile anymore on HP-UX since d5f26b1287916c17903


From: dima . pasechnik
Subject: Re: readline does not compile anymore on HP-UX since d5f26b1287916c1790323965d46f5e0acad89155
Date: Tue, 17 Aug 2021 16:30:15 +0100

On Tue, Aug 17, 2021 at 05:19:40PM +0200, Osipov, Michael (LDA IT PLM) wrote:
> Am 2021-08-17 um 17:09 schrieb Chet Ramey:
> > On 8/17/21 10:01 AM, Osipov, Michael (LDA IT PLM) wrote:
> > 
> >> But is still logically doesn't add up. From ./configure:
> >>> if test $ac_compiler_gnu = yes; then
> >>>    GCC=yes
> >>> else
> >>>    GCC=
> >>> fi
> >>
> >> So the variable is *always* set. Thus word is always substituted. I would
> >> expect no else branch in the if clause then I would competely agree with
> >> Chet. Removing the else block makes the sript works as expected.
> >>
> >> What am I missing here?
> > 
> > I think that's the issue. But since that code fragment isn't in the bash
> > or readline configure.ac, it's inserted by autoconf, probably as part of
> > AC_PROG_CC.
> > 
> > The documentation for AC_PROG_CC doesn't mention setting GCC to the empty
> > string if the compilation is not using gcc, but it seems to do that.
> > 
> > I guess I'll have to work around it.
The docs of AC_PROG_CC say that if CC was not found to be gcc, GCC won't be set 
to
"yes". And this suffices for all coding purposes.
So it's safe to use the usual pattern such as 

if test x$GCC = xyes; then
 dnl we have gcc (or a "fake" gcc)
 ...
else
 ... 
fi

Just in case,
Dima

> 
> Why not use :+ then?
> 



reply via email to

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