[cairo] Speeding up _cairo_fixed_from_double

Owen Taylor otaylor at redhat.com
Thu Oct 26 16:40:55 PDT 2006


On Thu, 2006-10-26 at 19:37 -0400, Michael Sweet wrote:
> Daniel Amelang wrote:
> >> Keep in mind that configure-time endian checks are unreliable on
> >> Mac OS X because a single executable may contain objects for multiple
> >> architectures (right now 32+64 bit Intel and PPC)...
> > 
> > AFAIK, the existence of fat binaries doesn't interfere with autoconf's
> > job. We're not building fat binaries during the configure stage, and
> > we don't compile to a fat binary. In addition, that would be a general
> > autoconf on OS X issue, not a cairo thing.
> 
> Well, the side effect is that the autoconf test will report the
> endianess of the host you are compiling on.  The problem is akin to
> cross-compiling Cairo...

Note that AC_C_BIGENDIAN almost never requires a runtime check:

 - Macro: AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE],
          [ACTION-IF-UNKNOWN])
     If words are stored with the most significant byte first (like
     Motorola and SPARC CPUs), execute ACTION-IF-TRUE.  If words are
     stored with the least significant byte first (like Intel and VAX
     CPUs), execute ACTION-IF-FALSE.

     This macro runs a test-case if endianness cannot be determined
     from the system header files.  When cross-compiling, the test-case
     is not run but grep'ed for some magic values.  ACTION-IF-UNKNOWN
     is executed if the latter case fails to determine the byte sex of
     the host system.

     The default for ACTION-IF-TRUE is to define `WORDS_BIGENDIAN'.
     The default for ACTION-IF-FALSE is to do nothing.  And finally,
     the default for ACTION-IF-UNKNOWN is to abort configure and tell
     the installer which variable he should preset to bypass this test.

						- Owen




More information about the cairo mailing list