What OS are you using? The windows version of PHP comes with a precompiled .dll for both gd1 and gd2 (I believe the gd1 version is pre 1.6, and thus has gif support... I could be wrong about that though). If you want to use it simply uncomment the line in your php.ini file that loads the dll. If you want to use GD2 just simply tell your php.ini file to load php_gd2.dll with the rest of the extensions.
If you're running on *nix, then you'll need to go to the url mordecai supplied to get more info.