[cairo] Compile Mac OS X universal binary of cairo

Michael Sweet mike at easysw.com
Tue Feb 6 11:31:58 PST 2007

Carl Worth wrote:
> On Tue, 06 Feb 2007 11:03:19 -0500, Michael Sweet wrote:
>> This sort of problem is exactly why I advocated against a configure-
>> time endian check when this code was added
> What do you suggest as a replacement?
>> and then tried to get at least a special case made for Mac OS X.
> What would the special case look like?

Here is the original thread where I mentioned this:


and my example (which would just need to be modified accordingly
for the stuff you are defining for word order):


Bill Spitzak also posted a response indicating that __BIG_ENDIAN__
is defined when compiling PPC or PPC64:


which would reduce the conditional code to:

     #ifdef __BIG_ENDIAN__
     ... force big-endian usage ...
     #elif defined(__APPLE__)
     ... force little-endian usage ...

Ideally, you'd just include that in the autoconf-generated config
header that defines the word order stuff, and the compiler would
do the rest.  The code would work for both "fat" builds as well
as traditional non-fat builds that are later merged with lipo, and
other platforms would happily ignore it and work as they do now.

Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com

More information about the cairo mailing list