Kyng Chaos
“The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects.”
- the wisdom of Tarzan

libTIFF Build

version: 4.0 CVS
source: http://www.remotesensing.org/libtiff/

This is a part of my UnixImageIO framework. A script is available to build the framework from sources.


The libtiff release schedule is slow, but there is very active development. To get the latest bigtiff support, there is a 4.0 alpha, but there are already bug fixes and improvements, so CVS HEAD is preferable.

Snow Leopard

In the libtiff source:

configure

export MACOSX_DEPLOYMENT_TARGET=10.6
./configure --disable-static --disable-dependency-tracking --disable-cxx \
--with-apple-opengl-framework \
--with-jpeg-include-dir=/usr/local/include --with-jpeg-lib-dir=/usr/local/lib \
CFLAGS="-Os -arch i386 -arch x86_64"

edit libtiff/tif_config.h and libtiff/tiffconf.h

Replace in each (some lines may not be present in both files):

Some are not used now, but may be in the future.

– the TIFF_INT64_T line with:

#define TIFF_INT64_T signed long long

– the TIFF_UINT64_T line with:

#define TIFF_UINT64_T unsigned long long

– the SIZEOF_SIGNED_LONG line) with:

#ifdef __LP64__
#define SIZEOF_SIGNED_LONG 8
#else
#define SIZEOF_SIGNED_LONG 4
#endif

– the SIZEOF_UNSIGNED_LONG line with:

#ifdef __LP64__
#define SIZEOF_UNSIGNED_LONG 8
#else
#define SIZEOF_UNSIGNED_LONG 4
#endif

– the SIZEOF_UNSIGNED_CHAR_P line with:

#ifdef __LP64__
#define SIZEOF_UNSIGNED_CHAR_P 8
#else
#define SIZEOF_UNSIGNED_CHAR_P 4
#endif

make & install

make
sudo make install

Leopard

In the libtiff source:

configure

export MACOSX_DEPLOYMENT_TARGET=10.5
./configure --disable-static --disable-dependency-tracking --disable-cxx \
--with-apple-opengl-framework \
--with-jpeg-include-dir=/usr/local/include --with-jpeg-lib-dir=/usr/local/lib \
CFLAGS="-Os -arch ppc -arch i386 -arch ppc64 -arch x86_64"

edit libtiff/tif_config.h and libtiff/tiffconf.h

Replace in each (some lines may not be present in both files):

endian stuff

– the HOST_BIGENDIAN line with:

#ifdef __BIG_ENDIAN__
  #define HOST_BIGENDIAN 1
#else
  #define HOST_BIGENDIAN 0
#endif

– the HOST_FILLORDER line with:

#ifdef __BIG_ENDIAN__
  #define HOST_FILLORDER FILLORDER_MSB2LSB
#else
  #define HOST_FILLORDER FILLORDER_LSB2MSB
#endif

– the WORDS_BIGENDIAN line with:

#ifdef __BIG_ENDIAN__
  #define WORDS_BIGENDIAN 1
#else
  #undef WORDS_BIGENDIAN
#endif

64bit stuff

Some are not used now, but may be in the future.

– the TIFF_INT64_T line with:

#define TIFF_INT64_T signed long long

– the TIFF_UINT64_T line with:

#define TIFF_UINT64_T unsigned long long

– the SIZEOF_SIGNED_LONG line) with:

#ifdef __LP64__
#define SIZEOF_SIGNED_LONG 8
#else
#define SIZEOF_SIGNED_LONG 4
#endif

– the SIZEOF_UNSIGNED_LONG line with:

#ifdef __LP64__
#define SIZEOF_UNSIGNED_LONG 8
#else
#define SIZEOF_UNSIGNED_LONG 4
#endif

– the SIZEOF_UNSIGNED_CHAR_P line with:

#ifdef __LP64__
#define SIZEOF_UNSIGNED_CHAR_P 8
#else
#define SIZEOF_UNSIGNED_CHAR_P 4
#endif

make & install

make
sudo make install

Tiger

In the libtiff source:

configure

export MACOSX_DEPLOYMENT_TARGET=10.4
./configure --disable-static --disable-dependency-tracking --disable-cxx \
--with-apple-opengl-framework \
--with-jpeg-include-dir=/usr/local/include --with-jpeg-lib-dir=/usr/local/lib \
CFLAGS="-Os -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"

edit libtiff/tif_config.h and libtiff/tiffconf.h

Apply just the endian edits from the Leopard section.

make & install

make
sudo make install

Panther

On Panther and for a generic single-arch build.

./configure --disable-static --disable-dependency-tracking --disable-cxx \
--with-apple-opengl-framework \
--with-jpeg-include-dir=/usr/local/include --with-jpeg-lib-dir=/usr/local/lib CFLAGS=-Os
macosx/build/libtiff.txt (2485 views) · Last modified: 2010/01/13 18:19 by kyngchaos
Copyright © 2004-2009 William Kyngesburye Driven by DokuWiki Recent changes RSS feed