The most probable cause of this is that you do not have the gd library and/or its required libraries (i.e. libpng, libjpeg, and zlib). If you do have the libraries installed on your system, the configure script may not have properly detected them before you compiled the CGIs. Here's what you can do to solve the issue:
Install the gd, png, jpeg, and zlib libraries on your system. You will also have to install the gd-devel, png-devel, jpeg-devel, and zlib-devel libraries. If you want RPMs for these libraries, try searching rpmfind.net for the following libraries:
Once you get the libraries installed on your system, run 'make devclean' in your Nagios source code distribution directory and rerun the configure script. The configure script should tell you whether or not the libraries required to build the statusmap, trends and histogram CGIs were found.
Note that you may have to help the configure script out when it comes to finding the location of the gd library and incude file. You can do this by using the --with-gd-lib and --with-gd-inc arguments. Example:
./configure --with-gd-lib=LIBDIR --with-gd-inc=INCDIR
Replace LIBDIR with the directory in which the gd library is installed (typically /usr/lib or /usr/local/lib) and replace INCDIR with the directory in which the header files for the gd library are installed (typically /usr/include or /usr/local/include).