GG relies on a few other open-source libraries:
Image loading library/libraries: Either:
Or, at least one of:
Optional libraries for input drivers:
GG's documentation relies on Doxygen (http://www.stack.nl/~dimitri/doxygen). If you have Doxygen installed in a standard location, the docs will be built automatically. Otherwise, from the GG/doc directory, run Doxygen; the documentation will appear in the GG/doc/GG directory.
GG uses CMake to generate makefiles, MSVC and XCode projects files, etc. Here is the quick-and-dirty info on using CMake. Download and install CMake if necessary, of course. You run ccmake (Linux) or cmake-gui (Windows or Mac OS X) to set the build options, such as whether to use DevIL, whether to build static or dynamic libs, etc. It's really straightforward, and the end result of using CMake is that you get to use make, Visual Studio's IDE, XCode projects, or whatever CMake-supported build tool you like. It supports just about everything.
You can let CMake know about any nonstandard paths to these headers and library binaries by running ccmake, then toggling on advanced mode by hitting 't', then filling in what CMake couldn't find. For example, if you want to use your own zlib, you can point CMake at it by setting ZLIB_INCLUDE_DIR and ZLIB_LIBRARY from the advanced mode. Other than cases like this, you shouldn't need to use the advanced mode.
Once this is done, Unix users can simply type
make make install [as root, if necessary]
If you want to build GG, you will need to have CMake installed, even if you want to use the Visual Studio IDE. Run cmake-gui, and select the top-level GG folder for the "Where is the source code" field, and wherever you want the build products to go for the "Where to build the binaries" field (these can be the same place if you like). Next, hit the Configure button. If the config step succeeds (unlikely ;) ), hit "Generate". Be sure to select the generator you want -- I think Borland CodeBuilder is the default, if you can believe that. After this, you should be able to launch your favorite IDE, or build using nmake, or whatever, from the "Where to build the binaries" folder.
If the config step fails, which is very likely, select the "Advanced View" in the view drop-list, and fill in the paths to headers and libs that CMake couldn't find. For instance, you'll probably need to fill in FREETYPE_INCLUDE_DIR_freetype2, FREETYPE_INCLUDE_DIR_ft2build, and FREETYPE_LIBRARY with the paths to the freetype2 folder, the path to the ft2build.h header, and the path to the FreeType link library, respectively. The fields you need to fill in will contain {field name}-NOTFOUND. Note that some fields are optional, e.g. those related to DevIL.