[Gdal-dev] Universal GDAL build on OS-X ??
    William Kyngesburye 
    woklist at kyngchaos.com
       
    Fri Oct 26 15:58:45 EDT 2007
    
    
  
I'm not sure how to work this in with cpl_config as a configurable  
item, I always patch after configuration.  The result would have to  
be as I said, or something similar - since WORDS_BIGENDIAN and  
HOST_FILLORDER are separate items, they could each have their own  
__BIG_ENDIAN__ test.
Since libtiff is the only other internal lib with an endian setting  
(HOST_FILLORDER), this should work for it, but I haven't tested it.   
There is also HOST_BIGENDIAN in libtiff (tif_open.c, line 352), but  
this isn't set in cpl_config for some reason, maybe something to do  
with the MDI_SUPPORT setting there?
Also, the universal flags don't behave well with libtool.  I used to  
do ugly patches to all the makefiles to get it to work, until I found  
the ccub trick.  But ccub is not a standard tool, so we can't depend  
on it.
The main problem is that adding flags to CFLAGS/CXXFLAGS and LDFLAGS  
can create duplicate entries for -isysflag (a lot of packages add  
both CFLAGS and LDFLAGS to the linking stage).  This causes an error  
in compilation and linking.  Duplicate -arch flags is OK.  Libtool  
may also strip them out as unknown flags (I'm not sure if libtool 2  
knows about them yet), I'd have to dig out my old notes to see how I  
used to handle that.
On Oct 26, 2007, at 2:20 PM, Howard Butler wrote:
>
> On Oct 26, 2007, at 11:53 AM, Christopher Barker wrote:
>>
>>> SO, for GDAL, if you have all other dependencies universal,  
>>> after  running configure edit port/cpl_config.h and delete the  
>>> two lines  with WORDS_BIGENDIAN and HOST_FILLORDER, and replace  
>>> them with:
>>> #ifdef __BIG_ENDIAN__
>>>    #define WORDS_BIGENDIAN 1
>>>    #define HOST_FILLORDER FILLORDER_MSB2LSB
>>> #else
>>>    #undef WORDS_BIGENDIAN
>>>    #define HOST_FILLORDER FILLORDER_LSB2MSB
>>> #endif
>>
>> Is there some way we could automate this so that we could have a -- 
>> with-osx-universal flag to configure?
>
> I would gladly take a patch for this.  We already have precedent  
> for the OSX framework stuff.
>
> Howard
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."
- A rule of the universe, from the HitchHiker's Guide to the Galaxy
    
    
More information about the Gdal-dev
mailing list