After having successfully moved my LaTeX publishing environment to the new Macbook, all that was left was a working Intel build of gnuplot 4.1.0 (which has some nice new features over 4.0). This was actually not quite easy, so I’m going to document my steps for producing a Universal Binary of Gnuplot 4.1 here for future reference.
You might also take a look at Plot. It’s a first-rate freeware plotting tool with some really great features (think ProFit or GRACE), AppleScript support, and a full-blown layout engine. All this is nicely integrated in a great looking Mac OS X GUI. I really love it.
How to Build and Install Gnuplot 4.1.0 on Mac OS X:
- Install AquaTerm. It’s currently at version 1.0.1 (built July 31, 2006) and a universal binary! Here the direct download link.
- Optionally, install Apples’s X-Windows (X11). It’s on your Mac OS X setup disk as an additional package. You do not need X11 to build or run Gnuplot. However, the pm3d mouse support for rotating and zooming is only available on X11 (i.e. not in AquaTerm).
- Install the Apple Developer CD. We require the GNU compiler and tools (XCode and the Apple Documentation is not required).
- Get Gnuplot 4.1.x from the Development Page. You might download the source from CVS. Or, as I did, download a source snapshot as a convenient .tar.gz archive. These archives can be found here. Unpack the archiv and you will have a folder named “gnuplot” on your Desktop or in your home directory.
- Now for the fun part. The sources have to be prepared, which would yield the “configure” script. To prepare we use the command
./prepare. However, you will get an error like
Use of uninitialized value in concatenation (.) or string at /usr/bin/automake line 8449.: am_gnuplot_OBJECTS was already defined in condition INCLUDE_BINARY_C_TRUE, which is implied by condition TRUE
Some part of the preparation process failed.
Please refer to INSTALL for details.
To fix the error, two modifcations in the file “src/Makefile.am” are required. Search for these two if-blocks and delete them or comment them out:
gnuplot_SOURCES += binary.c
gnuplot_SOURCES += wxterminal/gp_cairo.c wxterminal/wxt_gui.cpp
I had them at line 44-46 and 73-75.
./prepare; it should finish without any errors this time.
- Now call the configure script. If you have AquaTerm installed but not X11, then use
./configure -with-x=no --without-tutorial CFLAGS=-DDEFAULTTERM=\\\"aqua\\\"
With X11 installed, instead use
sudo make install
- Try the demos, like