Bizarre test for main in libm
Richard Earnshaw
rearnsha@arm.com
Fri May 2 08:43:00 GMT 2003
> On Thu, May 01, 2003 at 04:01:53PM -0500, Loren James Rittle wrote:
> > In article <200305011038.h41AcJm15772@pc960.cambridge.arm.com> you write:
> > >
> > > Does anyone know why that test is there in the first place?
> >
> > Mark, mentioned that the patch was sort-a-ugly. Are there any systems
> > where there is no -lm? The above test would not link if -lm was not
> > found. Correct?
>
> Right. It might just be a semi-convenient way of getting -lm added to
> LIBS if-and-only-if libm is available. The theory, I think, is that if
> libm is available at all, it's probably also required (for us).
>
Ah. I get it. I would have said this was non-obvious enough to warrant a
comment, but then I'm not an autoconf expert. It somewhat surprised me to
see
checking for main in -lm ... yes
scroll past on the screen (yes, they go slowly enough to read on one
machine I use).
R.
More information about the Libstdc++
mailing list