Compilation error on Mac OSX 10.5.2

I am upgrading root from 5.17.04 to 5.18.00 . I am installing it on a mac osx 10.5.2 .
When I installed 5.17 I had no problems. Trying to install 5.18 I get the error below. Any help would be greatly appreciated.

config.status: creating Makefile
config.status: creating afterbase.h
config.status: creating afterimage-libs
config.status: creating afterimage-config
config.status: creating config.h
config.status: config.h is unchanged
gcc -O -fPIC -g -I/opt/local/include/freetype2 -I/opt/local/include -c afterbase.c -o afterbase.o
afterbase.c: In function ‘asim_my_scandir’:
afterbase.c:1133: error: syntax error before ‘struct’
make[1]: *** [afterbase.o] Error 1
make: *** [asimage/src/libAfterImage/libAfterImage.a] Error 2

Others with the same computer have installed 5.18.00 successfully and we’re all at a loss at why this error is occuring. I have updated everything to the latest version (for things like freetype etc.).

Below is the configuration script
./configure macosx