AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.07.10 01:54 "Building a four way universal libtiff under OS X", by David Hoerl
2008.07.10 02:31 "Re: Building a four way universal libtiff under OS X", by Bob Friesenhahn

2008.07.10 01:54 "Building a four way universal libtiff under OS X", by David Hoerl

Previously, i was able to build libtiff as a two-way 32bit/64bit 
library on either a Intel or a PPC machine. I could build it fully 
4-way universal too, but it failed on the non-build platform.

I posted about this in Feb 2007.

What I found was that two tiff header files ended up with the wrong 
ENDIAN defines - these end up set to the build machine's values and 
not the architecture you are trying to build.

I'm almost certain that the root cause is this snippet from configure.ac:

dnl ---------------------------------------------------------------------------
dnl Configure legacy tifconf.h HOST_BIGENDIAN.
dnl ---------------------------------------------------------------------------
if test "$ac_cv_c_bigendian" = yes ; then
     HOST_BIGENDIAN=1
else
     HOST_BIGENDIAN=0
fi
AC_DEFINE_UNQUOTED(HOST_BIGENDIAN,$HOST_BIGENDIAN,[Native cpu byte 
order: 1 if big-endian (Motorola) or 0 if little-endian (Intel)])


The variable ac_cv_c_bigendian is set in the configure script itself 
and reflects the host machine.

So, what I did was hacked my ksh script to run the affected header 
files through "sed" to properly set these values. The script builds 
4-way Universal library (both a .a and a .dylib), but I have not yet 
verified that it functions properly on the alternate build machine 
(it should given the fix to the previously identified problem).

If anyone wants to download the script and try it, you can get it 
from: http://web.mac.com/dhoerl/Home/Tech_Blog/Tech_Blog.html

All you have to do is move it to the libtiff (3.8.2) top level 
directory and run it as ./UniBld.sh


David

PS: The 32 / 64 bit library has been working for me just fine for a 
few months now.