I ran into an issue trying to get Imagemagick (convert) working on OSX last night. I had compiled libjpeg and installed it, but when I would compile convert, it would not have jpeg support.
I found this post on dzone, which I followed and was able to use libjpeg just fine.
tar zxvf jpegsrc.v6b.tar.gz
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure --enable-shared --enable-static
sudo make install
sudo ranlib /usr/local/lib/libjpeg.a
I’m pretty sure I didn’t do the last step (sudo ranlib), and it worked fine.