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.0b6
source: http://www.remotesensing.org/libtiff/

parallel: OK

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

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

Add at the end of each file (make sure it's before the last #endif line in the tiffconf.h file):

#undef TIFF_INT64_T
#ifdef __LP64__
#define TIFF_INT64_T signed long
#else
#define TIFF_INT64_T signed long long
#endif
#undef TIFF_UINT64_T
#ifdef __LP64__
#define TIFF_UINT64_T unsigned long
#else
#define TIFF_UINT64_T unsigned long long
#endif
#undef TIFF_INT64_FORMAT
#ifdef __LP64__
#define TIFF_INT64_FORMAT "%ld"
#else
#define TIFF_INT64_FORMAT "%lld"
#endif
#undef TIFF_UINT64_FORMAT
#ifdef __LP64__
#define TIFF_UINT64_FORMAT "%lu"
#else
#define TIFF_UINT64_FORMAT "%llu"
#endif
#undef SIZEOF_SIGNED_LONG
#ifdef __LP64__
#define SIZEOF_SIGNED_LONG 8
#else
#define SIZEOF_SIGNED_LONG 4
#endif
#undef SIZEOF_UNSIGNED_LONG
#ifdef __LP64__
#define SIZEOF_UNSIGNED_LONG 8
#else
#define SIZEOF_UNSIGNED_LONG 4
#endif
#undef SIZEOF_UNSIGNED_CHAR_P
#ifdef __LP64__
#define SIZEOF_UNSIGNED_CHAR_P 8
#else
#define SIZEOF_UNSIGNED_CHAR_P 4
#endif

make & install

make
sudo make install

Note that there will be a lot of redefine warnings, these are harmless.

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

Add at the end of each file (make sure it's before the last #endif line in the tiffconf.h file):

#undef TIFF_INT64_T
#ifdef __LP64__
#define TIFF_INT64_T signed long
#else
#define TIFF_INT64_T signed long long
#endif
#undef TIFF_UINT64_T
#ifdef __LP64__
#define TIFF_UINT64_T unsigned long
#else
#define TIFF_UINT64_T unsigned long long
#endif
#undef TIFF_INT64_FORMAT
#ifdef __LP64__
#define TIFF_INT64_FORMAT "%ld"
#else
#define TIFF_INT64_FORMAT "%lld"
#endif
#undef TIFF_UINT64_FORMAT
#ifdef __LP64__
#define TIFF_UINT64_FORMAT "%lu"
#else
#define TIFF_UINT64_FORMAT "%llu"
#endif
#undef SIZEOF_SIGNED_LONG
#ifdef __LP64__
#define SIZEOF_SIGNED_LONG 8
#else
#define SIZEOF_SIGNED_LONG 4
#endif
#undef SIZEOF_UNSIGNED_LONG
#ifdef __LP64__
#define SIZEOF_UNSIGNED_LONG 8
#else
#define SIZEOF_UNSIGNED_LONG 4
#endif
#undef SIZEOF_UNSIGNED_CHAR_P
#ifdef __LP64__
#define SIZEOF_UNSIGNED_CHAR_P 8
#else
#define SIZEOF_UNSIGNED_CHAR_P 4
#endif
#undef HOST_BIGENDIAN
#ifdef __BIG_ENDIAN__
  #define HOST_BIGENDIAN 1
#else
  #define HOST_BIGENDIAN 0
#endif
#undef HOST_FILLORDER
#ifdef __BIG_ENDIAN__
  #define HOST_FILLORDER FILLORDER_MSB2LSB
#else
  #define HOST_FILLORDER FILLORDER_LSB2MSB
#endif

make & install

make
sudo make install

Note that there will be a lot of redefine warnings, these are harmless.

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

Add at the end of each file (make sure it's before the last #endif line in the tiffconf.h file):

#undef HOST_BIGENDIAN
#ifdef __BIG_ENDIAN__
  #define HOST_BIGENDIAN 1
#else
  #define HOST_BIGENDIAN 0
#endif
#undef HOST_FILLORDER
#ifdef __BIG_ENDIAN__
  #define HOST_FILLORDER FILLORDER_MSB2LSB
#else
  #define HOST_FILLORDER FILLORDER_LSB2MSB
#endif

make & install

make
sudo make install

Note that there will be a lot of redefine warnings, these are harmless.

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 · Last modified: 2010/07/26 11:37 by kyngchaos
[unknown link type]Back to top
Copyright © 2004-2011 William Kyngesburye Driven by DokuWiki Recent changes RSS feed