Chipmunk is a rigid body physics library.

This version of chipmunk physics allows the user of contraints (joints) such as Pivot, Pin, Motor, Spring, Breakable Joints, Gear, Groove, and Slide Joints.

http://forums.qj.net/showthread.php?t=147200