UNU.RAN is an ANSI C library licensed under GPL.
It contains universal (also called automatic or black-box) algorithms
that can generate random numbers from large classes of continuous or
discrete distributions, and also from practically all standard
distributions.
The library and an extensive online documentation are available at:
-------------------------------------------
http://statistik.wu-wien.ac.at/unuran/
-------------------------------------------