[cairo] Re: Flag for FP-challenged platforms

Daniel Amelang daniel.amelang at gmail.com
Wed Nov 29 16:45:03 PST 2006


On 11/29/06, Carl Worth <cworth at cworth.org> wrote:
> On Wed, 29 Nov 2006 16:04:32 -0800, "Daniel Amelang" wrote:
> > Notice that I don't try to guess what the value should be. If someone
> > wants to build some smarts into this, be my guest. In the meantime,
> > the embedded people will have to remember to specify
> > --enable-avoid-floating-point at configure time.
>
> Oh, yuck, now I'll complain. ;-)
>
> I was fine to let --avoid-floating-point go by without comment but
> --enable-avoid-floating-point is a pretty awkward phrase, (sounds to
> me like "turning on the turn-it-off switch" ).

Amen. I don't like it at all. But I've spent way too much time today
playing with names and such and since this is blocking some very
important patches, I figured the list would come up with something
better.

>
> I suppose that autoconf is restricting us to use either --enable or
> --disable here, right? Hmm.. or we can use --with too right? Though
> I've never liked mixing those because I can never remember if I'm
> supposed to pass --with or --enable for any given option. Add to that
> the fact that autoconf's configure script silently accepts, (and
> ignores), misspelled options and you've got quite a disaster on your
> hands.

Yes, I tried really hard to get my original --avoid-floating-point,
but configure won't let you define your own options. Using --with
_looked_ better, but then you invoke configure --help and you get it
listed under 'additional packages' (besides fighting the intution of
those that _do_ know that the --with option is for), so I threw it
out.

>
> Or can we just cut-and-paste the implementation of AC_ARG_ENABLE into
> our configure and actually advertise --avoid-floating-point as the
> option name?

Well, since configure is generated from configure.in, and there is no
way to instruct autoconf to allow custom options (like --avoid...),
this approach only works if we have a post-processing step where we go
in after autoconf with sed and add code to configure. AC_ARG_ENABLE
doesn't help because m4 is no longer in the picture once configure is
created.

The bottom line is that (AFAIK) you can't change autoconf's
restrictions on options via a macro. They are two different parts of
the system.

> I've tried to come up with a phrase that works both after the word
> "enable" and after the word "if", (for the macro), but didn't succeed
> very well:
>
>         --enable-floating-point-is-expensive ???
>         --enable-floating-point-considered-harmful ???

This is what I've been spending my afternoon doing :(

--enable-floating-point-avoidance anyone? Ugh.

Dan


More information about the cairo mailing list