The latter one is used by default, because it is faster. The assembler says it's based on gas 1.38. This is a problem when building shared libraries, as GNU libtool and configure scripts generated by it don't know how to handle Apple's linker. The GNU world uses a canonical format to specify system types. Sometimes a fourth part is added - then the third part denotes the kernel, while the fourth denotes the operating system.
All parts are lower case and concatenated using dashes.
Many packages that use autoconf want to know the host type of the system they are compiled on. You can either pass the host type to the configure script as a parameter or you can let it guess. The configure script uses two companion scripts to determine host types. These scripts are maintained as separate entities, but they are included in every package that uses them. If you have a package that doesn't recognize Darwin, you must replace the config.guess and config.sub included in the package.