Which *nix distribution and/or package manager (if any, e.g. yast, yum, apt, etc.) are you using? It may be possible to install the GD module without the need to compile it from source.
To directly answer your question, though, you'd run the "./configure" command from the directory where you originally extracted the PHP source code. If you didn't do that, then it's likely that either a) PHP was installed from a pre-compiled binary (or simply built from source automatically) using a package manager (hence my questions above), or b) the sysadmin who installed PHP deleted the directory containing the PHP source code after installing PHP (or possibly kept the directory, however it's not in a location you know of or possibly even have access to).