Previous MapServer versions used GD as the primary raster rendering backend. Because GD is not very capable of high quality output with regards to anti-aliasing, MapServer 5.0 has been released with a new rendering backend.
Anti-Grain Geometry (AGG) is a High Quality Rendering Engine for C++. Key features include rendering of arbitrary polygons with Anti-Aliasing and Subpixel Accuracy.
I’m testing this on Mac OS X 10.4.11 (sorry, no Leopard), and this time we are using MacPorts to install AGG.
$ sudo port install antigraingeometry
This puts AGG in /opt/local.
Now, to enable support for AGG in mapserver, download the MapServer 5.0.0 Source distribution from here and then continue with
$ tar zxvf mapserver-5.0.0.tar.gz
$ cd mapserver-5.0.0
$ ./configure -mandir=/usr/local/share/man -with-proj=/usr/local -with-gdal=/usr/local/bin/gdal-config -with-ogr -with-gd=/usr/local -with-xpm=/usr/X11R6 -with-wfs -with-wcs -with-wfsclient -with-wmsclient -with-agg=/opt/local/ -with-freetype
-with-agg=/opt/local/ -with-freetype is the part that is necessary for AGG suport.
The easiest way to test AGG rendering is by using the demo application which has been ported to MapServer 5.0. Download it from here and upack the workshop archive in your apache document root.
Apply this patch to the map file and edit the index.html to match your setup.