csperkins.org

Building gnuplot-4.4.2 on MacOS X 10.6.5

30 November 2010 / misc

Compiling gnuplot 4.4.2 on MacOS X is somewhat tricky.

The following set of commands work for me. YMMV. Note that AquaTerm 1.0.1 is a 32-bit binary, hence the -m32 flags below.

# Build jpeg-8b (http://www.ijg.org/)
cd jpeg-8b 
LDFLAGS=-m32 CFLAGS=-m32 ./configure --prefix=$HOME/apps/jpeg-8b 
make 
make install 

# Build gd-2.0.35 (http://www.libgd.org/)
cd gd-2.0.35 
LDFLAGS=-m32 CFLAGS=-m32 ./configure --prefix=$HOME/apps/gd-2.0.35 --with-jpeg=$HOME/apps/jpeg-8b 
make 
make install 

# Build PDFlib-Lite-7.0.5 (http://www.pdflib.com/download/pdflib-family/pdflib-lite-7/)
cd PDFlib-Lite-7.0.5 
LDFLAGS=-m32 CFLAGS=-m32 ./configure --prefix=$HOME/apps/PDFlib-Lite-7.0.5 --disable-shared --disable-cxx 
make 
make install 

# Build gnuplot-4.4.2
cd gnuplot-4.4.2 
LDFLAGS="-m32 -L$HOME/apps/gd-2.0.35/lib" CFLAGS="-m32" ./configure --prefix=$HOME/apps/gnuplot-4.4.2 --with-gd=$HOME/apps/gd-2.0.35 --with-pdf=$HOME/apps/PDFlib-Lite-7.0.5 --disable-wxwidgets --without-lisp-files --without-cairo --without-latex 
make 
make install