When trying to compile libgd in Centos 6.4 it fails with a message
gd_jpeg.c:228: error: ‘TRUE’ undeclared (first use in this function) gd_jpeg.c:228: error: (Each undeclared identifier is reported only once
replace all instances of TRUE with true replace all instances of FALSE with false
It compiles perfectly after that. Maybe it is worth incorporating in the source code itself.