Pano12
The pano12 library was originally created by Helmut Dersch as the core of Panorama Tools. The license is the GNU General Public License (GPL) and full sourcecode is available from the panotools sourceforge site.
pano12 is currently used by many front-end and command-line programs. The file itself may be called pano12.dll, libpano12.so, libpano12.dylib or pano12.lib depending on the operating system.
Due to apparent patent issues with fisheye lenses, many versions of the library (including the one hosted on sourceforge) have an artificial limitation of 160 degrees placed on the maximum field of view of source images.
Downloading pre-compiled versions
For Linux and other unix systems, look at the Hugin download page. Currently packages are available for debian, fedora, gentoo, mandrake and probably others.
For OS X a version is supplied with Hugin or PTMac.
For Windows you might download pano12 from Photocreations and sourceforge or find it bundled with PTAssembler or PTGui.