version: 6b
source: http://www.ijg.org/
This is a part of my UnixImageIO framework. An Xcode project is available to build the framework from sources.
libjpeg is a bit old and parts are out-of-date, and there is a bug, so it needs some patching. After expanding the tarball, you need to update some files.
First, download this patch for libtool, and unzip it into the source. This contains a couple Mac OS X patches to this version of libtool (updating the source to use the latest libtool is too much work). Also, download this patch for the jpeg makefile and unzip it into the source folder (replace the makefile.cfg there). This corrects install issues.
Now, in the source dir:
$ cp -f /usr/share/libtool/config.* . $ patch makefile.cfg makefile.cfg.patch
Then build for your OSX version:
export MACOSX_DEPLOYMENT_TARGET=10.5 ./configure --enable-shared --disable-static CC=~/bin/ccub_3264 CFLAGS=-Os make sudo make install
export MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-shared --disable-static CC=~/bin/ccub_t CFLAGS=-Os make sudo make install
Old Panther notes.
Something you can do if you want - a patch for a certain type of malformed jpeg-in-tiff created by old Wang software, pretty obscure. You can skip this if you like. You need the libtiff source for this patch: in the libtiff source /contrib/ojpeg, copy the contents of jdhuff_add.c and paste it at the end of the jpeg source jdhuff.c. There is nothing to configure here, the rest will be taken care of in libtiff.
$ ./configure --enable-shared --enable-static $ make $ sudo make install