I am currently printing to both pdf and jpeg formats from xmgrace, since png support was broken. But I need png support. After some digging into the system, I found that Snow Leopard has several versions for libpng and its include files, changing the lib/inc version number. At the end, I foudn the following solution to the configure script whichs sets everything up:
./configure LDFLAGS="-L/opt/X11/lib" CPPFLAGS="-I/opt/X11/include/libpng15" --with-png-library=-lpng15
This means I am using the png library installed from XQuartz. BTW, if you are using homebrew as me, just edit the grace formula to add the flags shown above:
def install
#ENV.x11
ENV.append "LDFLAGS", "-L/opt/X11/lib"
ENV.append "CPPFLAGS", "-I/opt/X11/include/libpng15"
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}", "--with-zlib",
"--with-png-library=-lpng15",
"--enable-grace-home=#{prefix}"
system "make install"
end
If you have gfortran, do not have f77, and you want the fortran tests, make a symbolic link from gfrotran to f77.